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 (go-gitea#11852)

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

Fix go-gitea#11851
  • Loading branch information
gernoteger authored and Yohann Delafollye committed Jul 31, 2020
1 parent 3c760c5 commit 789b642
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/migrations/gitlab.go
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 789b642

Please sign in to comment.