文章目录
解决 github 网站 git push 或者 git clone 代码速度太慢
工作中往往需要从 github 上 clone 别人的代码或者 Push 代码,如果特别慢或者根本连接不上!有个修改 hosts 的方法,不完全保证,可以试试!
1、获取 global.ssl.fastly 地址
访问 http://github.global.ssl.fastly.net.ipaddress.com/#ipinfo,获取 cdn 域名以及 IP Address
2、获取 global.ssl.fastly 地址
访问 http://github.com.ipaddress.com/#ipinfo,获取 cdn 域名以及 IP Address
3、修改 hosts 映射
// Windows路径:C:\Windows\System32\drivers\etc\hosts
// 文件末尾添加
#github related website
199.232.69.194http://github.global.ssl.fastly.net
140.82.113.4http://github.com
// Linux环境:
sudo vim /etc/hosts
#github related website
199.232.69.194http://github.global.ssl.fastly.net
140.82.113.4http://github.com
4、刷新系统 DNS
// Windows执行命令:
ipconfig /flushdns
// Linux执行命令/etc/init.d/networking restart
版权归原作者 失眠时间 所有, 如有侵权,请联系我们删除。