Skip to content

Commit

Permalink
Migration will clone repository from the proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
idealism-xxm committed Aug 16, 2021
1 parent 6bf5afe commit 072e8c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/migrations/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func NewGithubDownloaderV3(ctx context.Context, baseURL, userName, password, tok
Transport: &http.Transport{
Proxy: func(req *http.Request) (*url.URL, error) {
req.SetBasicAuth(userName, password)
return nil, nil
return http.ProxyFromEnvironment(req)
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion modules/migrations/gogs.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func NewGogsDownloader(ctx context.Context, baseURL, userName, password, token,
downloader.transport = &http.Transport{
Proxy: func(req *http.Request) (*url.URL, error) {
req.SetBasicAuth(userName, password)
return nil, nil
return http.ProxyFromEnvironment(req)
},
}

Expand Down

0 comments on commit 072e8c2

Please sign in to comment.