diff options
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r-- | routers/repo/repo.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go index 533bd569ad..1d29557005 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -214,9 +214,10 @@ func MigratePost(ctx *middleware.Context, form auth.MigrateRepoForm) { } } - if strings.Contains(err.Error(), "Authentication failed") { + if strings.Contains(err.Error(), "Authentication failed") || + strings.Contains(err.Error(), " not found") { ctx.Data["Err_Auth"] = true - ctx.RenderWithErr(ctx.Tr("form.auth_failed", err), MIGRATE, &form) + ctx.RenderWithErr(ctx.Tr("form.auth_failed", strings.Replace(err.Error(), ":"+form.AuthPassword+"@", ":<password>@", 1)), MIGRATE, &form) return } |