Fix #218
This commit is contained in:
parent
9085dfa426
commit
617bbe3fee
6 changed files with 27 additions and 24 deletions
|
@ -47,6 +47,7 @@ func NewServices() {
|
|||
func GlobalInit() {
|
||||
setting.NewConfigContext()
|
||||
log.Trace("Custom path: %s", setting.CustomPath)
|
||||
log.Trace("Log path: %s", setting.LogRootPath)
|
||||
mailer.NewMailerContext()
|
||||
models.LoadModelsConfig()
|
||||
models.LoadRepoConfig()
|
||||
|
|
|
@ -80,7 +80,9 @@ func MigratePost(ctx *middleware.Context, form auth.MigrateRepoForm) {
|
|||
return
|
||||
}
|
||||
|
||||
url := strings.Replace(form.Url, "://", fmt.Sprintf("://%s:%s@", form.AuthUserName, form.AuthPasswd), 1)
|
||||
authStr := strings.Replace(fmt.Sprintf("://%s:%s",
|
||||
form.AuthUserName, form.AuthPasswd), "@", "%40", -1)
|
||||
url := strings.Replace(form.Url, "://", authStr, 1) + "@"
|
||||
repo, err := models.MigrateRepository(ctx.User, form.RepoName, form.Description, form.Private,
|
||||
form.Mirror, url)
|
||||
if err == nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue