Skip to content

Commit

Permalink
Set the base url when migrating from Gitlab using access token or use…
Browse files Browse the repository at this point in the history
…rname 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 <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
  • Loading branch information
3 people authored Jul 2, 2020
1 parent 058ee52 commit d737eaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/migrations/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit d737eaa

Please sign in to comment.