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)

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

Fix #11851
  • Loading branch information
gernoteger authored Jun 11, 2020
1 parent c99ae4c commit a3fe9d8
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 a3fe9d8

Please sign in to comment.