diff options
author | zeripath <art27@cantab.net> | 2020-07-02 13:26:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-02 20:26:47 +0800 |
commit | d737eaa63a22344595347dfcbc23d8a7a13a88ee (patch) | |
tree | 7b456920d9a3d657a3c17f305c447b3f85aa8530 /modules | |
parent | 058ee52333e9fd445d082efb06e603e5c8359e7f (diff) | |
download | gitea-d737eaa63a22344595347dfcbc23d8a7a13a88ee.tar.gz gitea-d737eaa63a22344595347dfcbc23d8a7a13a88ee.zip |
Set the base url when migrating from Gitlab using access token or username without password (#11852) (#12104)
Backport #11852
When migrating from gitlab, set the baseUrl in NewGitlabDownloader when using an access token or username without password
Fix #11851
Co-authored-by: Gernot Eger <gernot.eger@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/migrations/gitlab.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/migrations/gitlab.go b/modules/migrations/gitlab.go index 8e1c7d0a83..4f218c95f1 100644 --- a/modules/migrations/gitlab.go +++ b/modules/migrations/gitlab.go @@ -90,7 +90,7 @@ func NewGitlabDownloader(baseURL, repoPath, username, password string) *GitlabDo var err error if username != "" { if password == "" { - gitlabClient, err = gitlab.NewClient(username) + gitlabClient, err = gitlab.NewClient(username, gitlab.WithBaseURL(baseURL)) } else { gitlabClient, err = gitlab.NewBasicAuthClient(username, password, gitlab.WithBaseURL(baseURL)) } |