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
mj-v1.14.3
Gernot Eger 4 years ago committed by GitHub
parent c99ae4cff4
commit a3fe9d87f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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))
}

Loading…
Cancel
Save