Published: 07 Dec 2018 › Updated: 07 Dec 2018

给git设置代理
There are two ways to clone in GitHub.
Clone with HTTPS: git clone https://github.com/xxx/xxx.git
Clone with SSH: git clone git@github.com:xxx/xxx.git
If you don't set up a proxy for local SSH, cloning using SSH will not take the proxy.
If you want to use the socks5 proxy, you only need one command
git config --global http.proxy socks5://your-server:your-port
Unset proxy:
git config --global --unset http.proxy
It works in my Ubuntu 16.04.
Leave 给git设置代理 to:
Read more #git posts
Best Posts From a186r
We have not curated any of a186r's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.