Have fun with sci.dog

git设置GitHub代理

github在国内的访问越来越不稳定了,如果出现速度慢,甚至无法连接的情况,可以通过设置代理解决。

具体的方法为

#只对github.com
git config --global http.https://github.com.proxy socks5://127.0.0.1:1080

#取消代理
git config --global --unset http.https://github.com.proxy)

#全部网站代理
git config --global https.proxy socks5://127.0.0.1:1080

#取消全部网站代理
git config --global --unset https.proxy

这里的socke5也可以为http,根据自己的代理情况设置。
127.0.0.1也可以换成其他IP,1080是端口号。

赞(1)
未经允许不得转载:SciDog » git设置GitHub代理

评论 抢沙发