解决git clone 速度过慢的问题~


在网站 https://www.ipaddress.com/ 解析地址
github.global.ssl.fastly.net

github.com

git clone特别慢可能是因为github的域名被限制了。

只要找到这个域名对应的ip地址,然后在hosts文件中加上ip–>域名的映射,刷新DNS缓存便可

 

Windows上的hosts文件路径在C:\Windows\System32\drivers\etc\hosts
Mac/Linux的hosts文件路径在:sudo vim /etc/hosts

Vim /etc/hosts
#此处应该是你本地解析出来的地址
199.232.5.??? github.global.ssl.fastly.net
192.30.253.??? github.com

刷线dns即可
Windows刷新dns: ipconfig /flushdns
Linux刷新dns: systemctl restart nscd 或者 /etc/init.d/nscd restart
Mac刷新dns:
[最新的 OS X Mountain Lion or Lion 上刷新DNS]
sudo killall -HUP mDNSResponder
[较新的苹果Mac OS X系统刷新DNS]
type dscacheutil -flushcache
[比较老的刷新DNS]
lookupd -flushcache

 

注:如果速度还是没上去, 去https://www.ipaddress.com/解析几次IP, 每次解析,IP可能会不一样, 多试几个, 总会找到速度快的, 附图:

 

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM