How is git push through network working? (proxy)

If your proxy allow access without user and password, then you can use:

git config --global https.proxy https://proxy.company.com:8888

If your proxy need user & password then:

git config --global https.proxy https://user:[email protected]:8888

Be sure to replace 8888 with your real proxy port.
Be sure to replace proxy.company.com with your real proxy server name or IP address.

Tell me if this helps.


To avoid each time using below command for different repositories :

git config --global https.proxy https://proxy.company.com:8888

set the environnementale variable as below and chill :

export https_proxy=https://username:password@proxy_ip:port

If you're behind an ntlm proxy where you need to specify domain, username and password I suggest using cntlm. You just need to configure cntlm with the proxy credentials then use localhost:3128 in the git config command.

Tags:

Proxy

Git