github访问慢解决方案

一、方法

ubuntu修改/etc/hosts(windows下C:\Windows\System32\drivers\etc\HOST)文件添加如下ip映射:192.30.253.113 github.com

二、原因

通过[站长工具]http://tool.chinaz.com/dns/工具可找到其他地点的访问以拿到github.com的其他ip。
我们知道,相同云服务商的ip速度肯定是差不多,因而我们可以先按云服务商每个服务商测试一个ip, 测试下来发现192.30.253.113最快。
确定了Ip,自然好办了,将这个ip添加到/etc/hosts即可192.30.253.113 github.com。
对于github的其他子域名(asset.github.com访问网页的时候可能用到子域名),可以采用类似方法寻找最优ip

三、修改hosts–目标文件夹访问拒绝解决办法

  1. 以管理员身份运行记事本
  2. 点击左侧open file打开C:\Windows\System32\drivers\etc\HOST即可修改

参考:
https://blog.csdn.net/ITleaks/article/details/80351680
https://blog.csdn.net/since_1904/article/details/70597009

发布了159 篇原创文章 · 获赞 41 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/qq_37768971/article/details/104494953