From a3fe9d87f2a7c7c9b5d5f5f5351e3c6c70aaf9fe Mon Sep 17 00:00:00 2001 From: Gernot Eger Date: Thu, 11 Jun 2020 17:41:01 +0200 Subject: [PATCH] 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 --- modules/migrations/gitlab.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) }