diff options
author | Gernot Eger <gernot.eger@gmail.com> | 2020-06-11 17:41:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-11 16:41:01 +0100 |
commit | a3fe9d87f2a7c7c9b5d5f5f5351e3c6c70aaf9fe (patch) | |
tree | 71fb909d4328a619d84d8704e29745e20c190bb7 /modules/migrations | |
parent | c99ae4cff470f9f34138aaf802b9bed8cd9ced57 (diff) | |
download | gitea-a3fe9d87f2a7c7c9b5d5f5f5351e3c6c70aaf9fe.tar.gz gitea-a3fe9d87f2a7c7c9b5d5f5f5351e3c6c70aaf9fe.zip |
Set the base url when migrating from Gitlab using access token or username without password (#11852)
When migrating from gitlab, set the baseUrl in NewGitlabDownloader when using an access token or username without password
Fix #11851
Diffstat (limited to 'modules/migrations')
-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)) } |