Windows11无法打开Github或者加载慢的解决方案教程
奕梦 2022-03-25 341作为一个站长,由于对电脑系统进行了升级,升级过后导致github无法访问,经过一段时间的研究和查阅资料后可以正常打开,但是加载速度非常慢,简直就是龟速,这次给大家分享一下具体教程和操作步骤。
注意:此教程分为五个教程并不是五个操作步骤,请各位访客自行分别测试。
一、修改电脑hosts文件
操作系统:Windows
1.找到hosts文件
路径为:C:WindowsSystem32driversetchosts
2.编辑该文件
可以用记事本打开,将下面文本粘贴进去,然后保存
192.30.253.112 github.com
192.30.253.119 gist.github.com
151.101.100.133 assets-cdn.github.com
151.101.100.133 raw.githubusercontent.com
151.101.100.133 gist.githubusercontent.com
151.101.100.133 cloud.githubusercontent.com
151.101.100.133 camo.githubusercontent.com
151.101.100.133 avatars0.githubusercontent.com
151.101.100.133 avatars1.githubusercontent.com
151.101.100.133 avatars2.githubusercontent.com
151.101.100.133 avatars3.githubusercontent.com
151.101.100.133 avatars4.githubusercontent.com
151.101.100.133 avatars5.githubusercontent.com
151.101.100.133 avatars6.githubusercontent.com
151.101.100.133 avatars7.githubusercontent.com
151.101.100.133 avatars8.githubusercontent.com
这时候可能遇到无法保存,需要管理员权限,操作方法
将hosts文件复制到桌面然后从桌面再复制到原hosts文件路径下即可替换。
二、如果还是无法访问就需要我们自行查找IP
查找方法:
首先确定Github的IP地址
打开:https://ipaddress.com/website/github.com(可以看到IP地址为:140.82.113.4)
然后确定域名的IP地址:
打开:https://ipaddress.com/website/github.global.ssl.fastly.net(IP地址为:199.232.69.194)
然后确定静态资源的IP地址:
打开:https://ipaddress.com/website/assets-cdn.github.com
依据上述方法一或者方法二给出hosts内容逐个查询,编写hosts文件
添加举列:
140.82.114.4 github.com
199.232.69.194 github.global.ssl.fastly.net
185.199.108.153 github.github.io
185.199.109.153 github.github.io
185.199.110.153 github.github.io
185.199.111.153 github.github.io
185.199.108.153 avatars0.githubusercontent.com
185.199.108.153 avatars1.githubusercontent.com
185.199.108.153 avatars2.githubusercontent.com
185.199.108.153 avatars3.githubusercontent.com
185.199.108.153 avatars4.githubusercontent.com
185.199.108.153 avatars5.githubusercontent.com
185.199.108.153 avatars6.githubusercontent.com
185.199.108.153 avatars7.githubusercontent.com
185.199.108.153 avatars8.githubusercontent.com
三、修改DNS解析地址
1.鼠标右键单击网络图标
2.点击打开:网络和Internet设置
3.点击:高级网络设置(win11)
4.点击更多网络适配器选项(win11)
5.右键单击正在使用的网络图标
6。点击属性
7.找到:internet协议版本4(TCP/IPv4)选择后并点击右下角属性
8.选择:使用下面的DNS服务器地址
9.这里推荐:4.2.2.2(微软)223.5.5.5(阿里),然后点击确定即可。
四、刷新DNS解析缓存
更改完hosts文件后,建议刷新一下DNS缓存
1.win+R打开运行窗口,并输入cmd,然后点击确定
2.输入下方命令并回车:
ipconfig /flushdns
五、使用Github镜像访问(这里不做推荐,请自行百度:Github镜像)
- 注意:本站文章来源于互联网,文章内容仅供参考学习使用,如果本站文章内容侵犯了贵司版权,请联系我们进行删除处理,谢谢您的合作!