diff options
author | Unknwon <u@gogs.io> | 2015-11-19 13:04:07 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-11-19 13:04:07 -0500 |
commit | c0b0ce7b1a0cd3d5001507ad0a7258d9d2345401 (patch) | |
tree | 632eec9fe48dece017da92162d512ee267b7f330 /routers/repo | |
parent | dc0c0dc06ba6569c379ed98e16f7407b15173af1 (diff) | |
download | gitea-c0b0ce7b1a0cd3d5001507ad0a7258d9d2345401.tar.gz gitea-c0b0ce7b1a0cd3d5001507ad0a7258d9d2345401.zip |
#1971 more general rule to detect error
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/repo.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go index ab7b4b99e5..d084faa4ea 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+"@", ":<password>@", 1)), MIGRATE, &form) return |