summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-07-02 14:26:47 +0200
committerGitHub <noreply@github.com>2020-07-02 14:26:47 +0200
commitd737eaa63a22344595347dfcbc23d8a7a13a88ee (patch)
tree7b456920d9a3d657a3c17f305c447b3f85aa8530
parentFix gitgraph branch continues after merge (#12044) (#12105) (diff)
downloadforgejo-d737eaa63a22344595347dfcbc23d8a7a13a88ee.tar.xz
forgejo-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>
-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))
}