diff --git a/routers/repo/repo.go b/routers/repo/repo.go index ab7b4b99e5c..d084faa4ea7 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -203,9 +203,9 @@ func MigratePost(ctx *middleware.Context, form auth.MigrateRepoForm) { } } - if strings.Contains(err.Error(), "Authentication failed") || - strings.Contains(err.Error(), " not found") || + if strings.Contains(err.Error(), "fatal:") || strings.Contains(err.Error(), "could not read Username") { + ctx.Data["Err_CloneAddr"] = true ctx.Data["Err_Auth"] = true ctx.RenderWithErr(ctx.Tr("form.auth_failed", strings.Replace(err.Error(), ":"+form.AuthPassword+"@", ":@", 1)), MIGRATE, &form) return