首页 > 其他分享 >GitHub不能访问处理

GitHub不能访问处理

时间:2022-10-11 11:58:40浏览次数:57  
标签:GitHub etc 处理 访问 github hosts com

最近国内访问github.com经常打不开,无法访问。

解决Github打不开办法

打开网站http://tool.chinaz.com/dns/ ,在A类型的查询中输入 github.com,找到最快访问的ip地址,并复制下来。

三个网站:

github网址查询:https://ipaddress.com/website/github.com

github域名查询:https://ipaddress.com/website/github.global.ssl.fastly.net

github静态资源ip:https://ipaddress.com/website/assets-cdn.github.com

1、打开hosts文件

先找到 hosts 文件的位置,不同操作系统,hosts 文件的存储位置也不同:

  • Windows 系统:C:WindowsSystem32driversetchosts
  • Linux 系统:/etc/hosts
  • Mac(苹果电脑)系统:/etc/hosts
  • Android(安卓)系统:/system/etc/hosts
  • iPhone(iOS)系统:/etc/hosts

2、然末尾放入一下两个 IP 地址:

# GitHub Start
140.82.114.4 github.com
199.232.69.194 github.global.ssl.fastly.net
# GitHub End

保存退出

3、在 CMD 命令行中执行下面语句 来刷新 DNS,重启浏览器之后就能进入Github 网址。

ipconfig/flushdns
然后直接访问

标签:GitHub,etc,处理,访问,github,hosts,com
From: https://www.cnblogs.com/qiuyu666/p/16778708.html

相关文章