I am using git behind a corporate firewall, and I am successfully cloning external projects by using the http.proxy --global config.
My problem arises when I want to clone through http on the intranet. I suspect that the proxy config interferes with the intranet request.
I know I could reset the config before using the intranet, but that is not very user friendly.
I also saw this answer, but it seems to apply only to an existing repository.
Is there a way to deactivate the proxy usage only for one command invocation? In this case, the initial clone?
To remove a proxy server by using the Netsh.exe toolClick Start, click Run, type cmd, and then click OK. At the command prompt, type netsh winhttp reset proxy, and then press ENTER.
The git config command is a convenience function that is used to set Git configuration values on a global or local project level. These configuration levels correspond to . gitconfig text files. Executing git config will modify a configuration text file.
I always set:
no_proxy=.mycompany
(export
if I am on Unix, or a simple set
on Windows)
It is enough to bypass the proxy for all intranet url ending with ".mycompany
".
See for an example:
git-svn fetch
behind proxy"I use it in my own project: .proxy.example
:
export http_proxy=http://username:[email protected]:port export https_proxy=http://username:[email protected]:port export no_proxy=.company localhost
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With