git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com: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'