summaryrefslogtreecommitdiffstats
path: root/routers/repo/repo.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-12-08 20:06:12 -0500
committerUnknwon <u@gogs.io>2015-12-08 20:06:12 -0500
commit120cd4e4716d11f79a7e8c41c066383e579d480a (patch)
treeb25ae1b31ecf5437250c388d55ee940e294a4187 /routers/repo/repo.go
parent1cbd4c01fbfd4e15e36a722c9e2cc19366be3df8 (diff)
downloadgitea-120cd4e4716d11f79a7e8c41c066383e579d480a.tar.gz
gitea-120cd4e4716d11f79a7e8c41c066383e579d480a.zip
#1984 Better mirror repo management
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r--routers/repo/repo.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index f930c132d2..7cc7df35a2 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -192,7 +192,7 @@ func MigratePost(ctx *middleware.Context, form auth.MigrateRepoForm) {
RemoteAddr: remoteAddr,
})
if err == nil {
- log.Trace("Repository migrated[%d]: %s/%s", repo.ID, ctxUser.Name, form.RepoName)
+ log.Trace("Repository migrated [%d]: %s/%s", repo.ID, ctxUser.Name, form.RepoName)
ctx.Redirect(setting.AppSubUrl + "/" + ctxUser.Name + "/" + form.RepoName)
return
}
@@ -206,11 +206,11 @@ func MigratePost(ctx *middleware.Context, form auth.MigrateRepoForm) {
if strings.Contains(err.Error(), "Authentication failed") ||
strings.Contains(err.Error(), "could not read Username") {
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", models.HandleCloneUserCredentials(err.Error(), true)), MIGRATE, &form)
return
} else if strings.Contains(err.Error(), "fatal:") {
ctx.Data["Err_CloneAddr"] = true
- ctx.RenderWithErr(ctx.Tr("repo.migrate.failed", strings.Replace(err.Error(), ":"+form.AuthPassword+"@", ":<password>@", 1)), MIGRATE, &form)
+ ctx.RenderWithErr(ctx.Tr("repo.migrate.failed", models.HandleCloneUserCredentials(err.Error(), true)), MIGRATE, &form)
return
}