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?
As an alternative to using git config --global http.proxy address:port
, you can set the proxy on the command line:
git -c "http.proxy=address:port" clone https://...
The advantage is the proxy is not persistently set. Under Bash you might set an alias:
alias git-proxy='git -c "http.proxy=address:port"'