Set the base url when migrating from Gitlab using access token or username without password ()

When migrating from gitlab, set the baseUrl in NewGitlabDownloader when using an access token or username without password

Fix 
This commit is contained in:
Gernot Eger
2020-06-11 17:41:01 +02:00
committed by GitHub
parent c99ae4cff4
commit a3fe9d87f2

@ -90,7 +90,7 @@ func NewGitlabDownloader(baseURL, repoPath, username, password string) *GitlabDo
var err error var err error
if username != "" { if username != "" {
if password == "" { if password == "" {
gitlabClient, err = gitlab.NewClient(username) gitlabClient, err = gitlab.NewClient(username, gitlab.WithBaseURL(baseURL))
} else { } else {
gitlabClient, err = gitlab.NewBasicAuthClient(username, password, gitlab.WithBaseURL(baseURL)) gitlabClient, err = gitlab.NewBasicAuthClient(username, password, gitlab.WithBaseURL(baseURL))
} }