From 072e8c2bb63eae53343520a4c267728927b1641a Mon Sep 17 00:00:00 2001 From: idealism-xxm Date: Mon, 16 Aug 2021 20:35:33 +0800 Subject: [PATCH] Migration will clone repository from the proxy --- modules/migrations/github.go | 2 +- modules/migrations/gogs.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) }, }