summaryrefslogtreecommitdiffstats
path: root/modules/migrations
diff options
context:
space:
mode:
authorGernot Eger <gernot.eger@gmail.com>2020-06-11 17:41:01 +0200
committerGitHub <noreply@github.com>2020-06-11 16:41:01 +0100
commita3fe9d87f2a7c7c9b5d5f5f5351e3c6c70aaf9fe (patch)
tree71fb909d4328a619d84d8704e29745e20c190bb7 /modules/migrations
parentc99ae4cff470f9f34138aaf802b9bed8cd9ced57 (diff)
downloadgitea-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.go2
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))
}