gitclone太慢解决方式

git clone太慢解决方式

这里的处理方式是通过ss代理,亲测有效。之前clone只有几k的速度,现在能达到300多了。

  1. 首先得有ss
  2. git设置scocks5代理

git config –global http.proxy ‘socks5://127.0.0.1:1080’

git config –global https.proxy ‘socks5://127.0.0.1:1080’

  1. 修改hosts文件,在hosts文件中添加

192.30.253.113 github.com

151.101.72.249 github.global.ssl.fastly.net

  1. 刷新dns缓存 mac刷新dns缓存命令:dscacheutil -flushcache,windows刷新dns缓存命令:ipconfig /flushdns

sudo dscacheutil -flushcache

这里如果没有ss ,可以忽略1.2步,但是没有测试过

大爷,赏点?
0%