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