git config --global http.proxy http://proxyuser:[email protected]:8080
proxyuser
用戶名proxypwd
密碼proxy.server.com
代理服務器8080
端口
如果想消除代理的設置:
git config --global --unset http.proxy
如果想查看代理的設置
git config --global --get http.proxy
但是,我設置的時候添加用戶名和密碼的時候,出錯,於是我把用戶和密碼去掉
只有:
git config --global http.proxy http://proxy.server.com:8080
然後就可以直接使用github 上的倉庫;
設置socks的代理 http/https協議(clone https://前綴的repo會走ss)
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'