首页 > 其他 > 详细

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

时间:2020-03-08 19:34:03      阅读:153      评论:0      收藏:0      [点我收藏+]

在网站 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可能会不一样, 多试几个, 总会找到速度快的, 附图:

 

 

 

技术分享图片

 

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

原文:https://www.cnblogs.com/manhelp/p/12444022.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!