mirror of
https://github.com/go-gitea/gitea
synced 2024-11-10 17:25:54 +01:00
#1971 more general rule to detect error
This commit is contained in:
parent
dc0c0dc06b
commit
c0b0ce7b1a
@ -203,9 +203,9 @@ func MigratePost(ctx *middleware.Context, form auth.MigrateRepoForm) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.Contains(err.Error(), "Authentication failed") ||
|
if strings.Contains(err.Error(), "fatal:") ||
|
||||||
strings.Contains(err.Error(), " not found") ||
|
|
||||||
strings.Contains(err.Error(), "could not read Username") {
|
strings.Contains(err.Error(), "could not read Username") {
|
||||||
|
ctx.Data["Err_CloneAddr"] = true
|
||||||
ctx.Data["Err_Auth"] = true
|
ctx.Data["Err_Auth"] = true
|
||||||
ctx.RenderWithErr(ctx.Tr("form.auth_failed", strings.Replace(err.Error(), ":"+form.AuthPassword+"@", ":<password>@", 1)), MIGRATE, &form)
|
ctx.RenderWithErr(ctx.Tr("form.auth_failed", strings.Replace(err.Error(), ":"+form.AuthPassword+"@", ":<password>@", 1)), MIGRATE, &form)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user