Skip to content

Commit

Permalink
fix git http_proxy ignored
Browse files Browse the repository at this point in the history
Signed-off-by: Steeve Chailloux <[email protected]>
  • Loading branch information
WnP committed Dec 27, 2024
1 parent ee725f1 commit c4f6e60
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions util/gitutil/git_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@ func (cli *GitCLI) Run(ctx context.Context, args ...string) (_ []byte, err error
"GIT_CONFIG_NOSYSTEM=1", // Disable reading from system gitconfig.
"HOME=/dev/null", // Disable reading from user gitconfig.
"LC_ALL=C", // Ensure consistent output.
"HTTP_PROXY=" + os.Getenv("HTTP_PROXY"),
"HTTPS_PROXY=" + os.Getenv("HTTPS_PROXY"),
"NO_PROXY=" + os.Getenv("NO_PROXY"),
"http_proxy=" + os.Getenv("http_proxy"),
"https_proxy=" + os.Getenv("https_proxy"),
"no_proxy=" + os.Getenv("no_proxy"),
}
if cli.sshAuthSock != "" {
cmd.Env = append(cmd.Env, "SSH_AUTH_SOCK="+cli.sshAuthSock)
Expand Down

0 comments on commit c4f6e60

Please sign in to comment.