diff options
author | Unknwon <u@gogs.io> | 2015-03-20 01:58:28 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-03-20 01:58:28 -0400 |
commit | 62e436e6b7a41bac2e17a26f08649c144cef5b57 (patch) | |
tree | 379be1b74989d5be2aacc68753b0d3d12597d400 /routers/api/v1/repo.go | |
parent | 4b9fb43a708d0aaaf710a060f7b2dd0b7ad959d0 (diff) | |
parent | e312634286e68d8fac4d20adb729661f8a444b2a (diff) |
Merge branch 'develop' of github.com:gogits/gogs into release/0.6.1
Diffstat (limited to 'routers/api/v1/repo.go')
-rw-r--r-- | routers/api/v1/repo.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/api/v1/repo.go b/routers/api/v1/repo.go index eb990891..6bb78ba0 100644 --- a/routers/api/v1/repo.go +++ b/routers/api/v1/repo.go @@ -196,7 +196,7 @@ func MigrateRepo(ctx *middleware.Context, form auth.MigrateRepoForm) { } } - // Remote address can be HTTPS URL or local path. + // Remote address can be HTTP/HTTPS URL or local path. remoteAddr := form.CloneAddr if strings.HasPrefix(form.CloneAddr, "http") { u, err := url.Parse(form.CloneAddr) @@ -204,8 +204,8 @@ func MigrateRepo(ctx *middleware.Context, form auth.MigrateRepoForm) { ctx.HandleAPI(422, err) return } - if len(form.AuthUserName) > 0 || len(form.AuthPasswd) > 0 { - u.User = url.UserPassword(form.AuthUserName, form.AuthPasswd) + if len(form.AuthUsername) > 0 || len(form.AuthPassword) > 0 { + u.User = url.UserPassword(form.AuthUsername, form.AuthPassword) } remoteAddr = u.String() } else if !com.IsDir(remoteAddr) { |