1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-07-05 00:59:04 +02:00

feat: use proxy from environment (#1885)

* feat: use proxy from environment

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* Update internal/client/github.go

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker
2020-11-05 05:16:25 -03:00
committed by GitHub
parent 032a105533
commit f1049b94ef
4 changed files with 4 additions and 0 deletions

View File

@ -38,6 +38,7 @@ func NewGitHub(ctx *context.Context, token string) (Client, error) {
base.(*http.Transport).TLSClientConfig = &tls.Config{
InsecureSkipVerify: ctx.Config.GitHubURLs.SkipTLSVerify,
}
base.(*http.Transport).Proxy = http.ProxyFromEnvironment
httpClient.Transport.(*oauth2.Transport).Base = base
client := github.NewClient(httpClient)
if ctx.Config.GitHubURLs.API != "" {