Getting git to work with http proxy

I sometimes work behind a http proxy. When i need to pull or push commit to my repository i need my git to pass via http proxy. You do not need to install any proxy software. There are build-in command you can use to set allow git via proxy. Here is the tutorial how you set git behind a proxy.

Command to use:

set http_proxy=http.proxy http://proxyuser:[email protected]:8080

git config --global http.proxy %http_proxy%


git config --global http.proxy http://proxyuser:[email protected]:8080

  • change proxyuser to your proxy user
  • change proxypwd to your proxy password
  • change to the URL of your proxy server
  • change 8080 to the proxy port configured on your proxy server

If you decide at any time to reset this proxy and work without proxy:

Command to use:

git config --global --unset http.proxy

Finally, to check the currently set proxy:

git config --global --get http.proxy

wahyu way

Tech savvy, mobile app consultant, hard worker, runner, traveller