为什么使用其他方式上网后GitHub速度依然很慢
由于Github速度很慢,即使你使用其他方式上网后,可以上Google,但是Github的下载速度依旧很慢,严重影响了我们的工作效率。原因是:使用其他方式上网软件不能代理git的网络,我们需要单独在git配置。
首先
我们在桌面空白处按住shift + 鼠标右键,打开Powershell。
接着
输入下面两行代码:
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 http.proxy 127.0.0.1:1080
git config --global https.proxy 127.0.0.1:1080
加上上面两行代码就成功在git配置了,那么我们怎么知道我们是否配置成功呢?可以使用下面的代码查看:
git config --global -l
看到了如下的配置信息说明配置成功,恭喜你可以轻松下载GitHub的东西了!!!
最后
如果我们配置了上面的东西,如果是正常上网,没有使用其他方式上网,下载GitHub的东西,是会出错的,那么怎么解决呢?可以写入以下的代码重置!
git config --global --unset https.proxy
git config --global --unset http.proxy