之前用公司电脑一直好好的,今年新冠肺炎一直在家办公,公司还没通知何时去上班。本想在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操作时遇到网络非常慢、甚至超时的情况,可以试试设置代理或者取消代理能不能解决你的问题吧~
本文介绍了解决在家办公期间使用Git操作时遇到的网络非常慢、甚至超时的问题。通过设置或取消代理,成功解决了从GitHub克隆项目的问题。文章详细介绍了如何配置http和https代理,以及如何取消和查看代理设置。
13万+

被折叠的 条评论
为什么被折叠?



