How do I get Git to use a proxy server?
I need to check out code from a Git server, but it shows \"Request timed out\" every time. How do I get around this?
Setting git proxy on terminal
if
Set it globally once
git config --global http.proxy username:password@proxy_url:proxy_port
git config --global https.proxy username:password@proxy_url:proxy_port
if you want to set proxy for only one git project (there may be some situations where you may not want to use same proxy or any proxy at all for some git connections)
//go to project root
cd /bla_bla/project_root
//set proxy for both http and https
git config http.proxy username:password@proxy_url:proxy_port
git config https.proxy username:password@proxy_url:proxy_port
if you want to display current proxy settings
git config --list
if you want to remove proxy globally
git config --global --unset http.proxy
git config --global --unset https.proxy
if you want to remove proxy for only one git root
//go to project root
cd /bla-bla/project_root
git config --unset http.proxy
git config --unset https.proxy