|
@@ -203,12 +203,15 @@ func MigratePost(ctx *middleware.Context, form auth.MigrateRepoForm) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if strings.Contains(err.Error(), "fatal:") ||
|
|
|
|
|
|
+ if strings.Contains(err.Error(), "Authentication failed") ||
|
|
strings.Contains(err.Error(), "could not read Username") {
|
|
strings.Contains(err.Error(), "could not read Username") {
|
|
- ctx.Data["Err_CloneAddr"] = true
|
|
|
|
ctx.Data["Err_Auth"] = true
|
|
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", strings.Replace(err.Error(), ":"+form.AuthPassword+"@", ":<password>@", 1)), MIGRATE, &form)
|
|
return
|
|
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)
|
|
|
|
+ return
|
|
}
|
|
}
|
|
|
|
|
|
handleCreateError(ctx, err, "MigratePost", MIGRATE, &form)
|
|
handleCreateError(ctx, err, "MigratePost", MIGRATE, &form)
|