diff options
author | Unknwon <u@gogs.io> | 2017-04-04 20:42:18 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-04-04 20:42:18 -0400 |
commit | c05717a5f086c172e67b0bb9cd351e0e972de93d (patch) | |
tree | 8ff189a105e3846e88454b24760605ee28d4832d /routers | |
parent | 5a488b6517bd6a9980c3f226231ff21a4ca06746 (diff) |
models/mirror: feed git.IsRepoURLAccessible with raw mirror address
Diffstat (limited to 'routers')
-rw-r--r-- | routers/api/v1/repo/repo.go | 2 | ||||
-rw-r--r-- | routers/repo/http.go | 1 | ||||
-rw-r--r-- | routers/repo/repo.go | 4 |
3 files changed, 3 insertions, 4 deletions
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index d7109f78..e0f62baf 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -270,7 +270,7 @@ func Migrate(ctx *context.APIContext, f form.MigrateRepo) { log.Error(4, "DeleteRepository: %v", errDelete) } } - ctx.Error(500, "MigrateRepository", models.HandleCloneUserCredentials(err.Error(), true)) + ctx.Error(500, "MigrateRepository", models.HandleMirrorCredentials(err.Error(), true)) return } diff --git a/routers/repo/http.go b/routers/repo/http.go index 7c1f690e..b3b6aa1a 100644 --- a/routers/repo/http.go +++ b/routers/repo/http.go @@ -111,7 +111,6 @@ func HTTPContexter() macaron.Handler { askCredentials(c, http.StatusUnauthorized, "") return } - fmt.Println(authUsername, authPassword) authUser, err := models.UserSignIn(authUsername, authPassword) if err != nil && !errors.IsUserNotExist(err) { diff --git a/routers/repo/repo.go b/routers/repo/repo.go index 3626ac49..a3e5291d 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -217,11 +217,11 @@ func MigratePost(ctx *context.Context, f form.MigrateRepo) { 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", models.HandleCloneUserCredentials(err.Error(), true)), MIGRATE, &f) + ctx.RenderWithErr(ctx.Tr("form.auth_failed", models.HandleMirrorCredentials(err.Error(), true)), MIGRATE, &f) return } else if strings.Contains(err.Error(), "fatal:") { ctx.Data["Err_CloneAddr"] = true - ctx.RenderWithErr(ctx.Tr("repo.migrate.failed", models.HandleCloneUserCredentials(err.Error(), true)), MIGRATE, &f) + ctx.RenderWithErr(ctx.Tr("repo.migrate.failed", models.HandleMirrorCredentials(err.Error(), true)), MIGRATE, &f) return } |