diff --git a/modules/migrations/github.go b/modules/migrations/github.go index cc5279e38fb30..8548e0f021cfe 100644 --- a/modules/migrations/github.go +++ b/modules/migrations/github.go @@ -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) }, }, } diff --git a/modules/migrations/gogs.go b/modules/migrations/gogs.go index 9e663fd1fee47..010b673bbc749 100644 --- a/modules/migrations/gogs.go +++ b/modules/migrations/gogs.go @@ -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) }, }