github clone非常慢,解決方法,首先要有vpn
參考 https://www.zhihu.com/question/27159393
第一種方法
這種是沒有vpn的方法,測試從10k到 幾十k
windows下:用編輯器打開host文件: C:\Windows\System32\drivers\etc\hosts
把下面兩行加到host文件末尾
151.101.72.249 github.http://global.ssl.fastly.net
192.30.253.112 github.com
作者:曾笑雨
鏈接:https://www.zhihu.com/question/27159393/answer/728530641
來源:知乎
著作權歸作者所有。商業轉載請聯系作者獲得授權,非商業轉載請注明出處。
第二種方法
有vpn
打開vpn的socks5
當使用 finalspeed 加速時:
1. 使用
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
設置 git 走代理
2. 復制要 clone 的倉庫的 https 地址(很重要!只能使用 https 地址,ssh 地址無效)
3. 速度飛快!
作者:熱愛
鏈接:https://www.zhihu.com/question/27159393/answer/557098594
來源:知乎
著作權歸作者所有。商業轉載請聯系作者獲得授權,非商業轉載請注明出處。
在使用另一個vpn的時候發現,不用設置socks5也是可以的,git config那兩句就是設置socks5走哪個代理,1080端口就是http的端口,也就是設置走http的代理,也就是我們vpn正常上網的代理。理論上上網沒問題,直接設置就可以
