解決 github 網(wǎng)站 git push 或者 git clone 代碼速度太慢
工作中往往需要從 github 上 clone 別人的代碼或者 Push 代碼,如果特別慢或者根本連接不上!有個(gè)修改 hosts 的方法,不完全保證,可以試試!
1、獲取 global.ssl.fastly 地址
訪問 http://github.global.ssl.fastly.net.ipaddress.com/#ipinfo,獲取 cdn 域名以及 IP Address文章來源:http://www.zghlxwxcb.cn/news/detail-788290.html
2、獲取 global.ssl.fastly 地址
訪問 http://github.com.ipaddress.com/#ipinfo,獲取 cdn 域名以及 IP Address文章來源地址http://www.zghlxwxcb.cn/news/detail-788290.html
3、修改 hosts 映射
// Windows路徑:
C:\Windows\System32\drivers\etc\hosts
// 文件末尾添加
#github related website
199.232.69.194 http://github.global.ssl.fastly.net
140.82.113.4 http://github.com
// Linux環(huán)境:
sudo vim /etc/hosts
#github related website
199.232.69.194 http://github.global.ssl.fastly.net
140.82.113.4 http://github.com
4、刷新系統(tǒng) DNS
// Windows執(zhí)行命令:
ipconfig /flushdns
// Linux執(zhí)行命令
/etc/init.d/networking restart
到了這里,關(guān)于解決 github 網(wǎng)站 git push 或者 git clone 代碼速度太慢的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!