之前用公司电脑一直好好的,今年新冠肺炎一直在家办公,公司还没通知何时去上班。本想在github上找几个demo学习,可是一直clone不下来。百度、google了一圈最后解决了。
设置代理
http代理:git config --global http.proxy 'http://127.0.0.1:1087'
https代理:git config --global https.proxy 'https://127.0.0.1:1087'
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy
查看代理
git config --global --get http.proxy
git config --global --get https.proxy
如果你在git操作时遇到网络非常慢、甚至超时的情况,可以试试设置代理或者取消代理能不能解决你的问题吧~