国内Github无法访问

GitHub这个网站相信大家都比较熟悉,但是在国内访问完全是看缘分,那么Github无法访问怎么办呢,下介绍一种修改host的方法(老方法,会存在失效的host),达到国内流畅访问,当然最好的方式是你可以自行搭建代理服务器,这种可以突破各种404 的问题,不过你得需要一点技术和成本,而这个修改host完全不需要投入成本,如果你只需要访问github的话,可以试试这个方法确实不错,当然这种修改host的方法会失效的(看缘分),只能解决一时的需求。

Github无法访问解决步骤

1.打开C:\Windows\System32\drivers\etc 路径下的的hosts文件,在hosts文件内加上如下内容并保存

Github可用的host

140.82.114.4 github.com
140.82.114.4 gist.github.com
185.199.108.153 assets-cdn.github.com
151.101.64.133 raw.githubusercontent.com
151.101.108.133 gist.githubusercontent.com
151.101.108.133 cloud.githubusercontent.com
151.101.108.133 camo.githubusercontent.com
151.101.108.133 avatars0.githubusercontent.com
151.101.108.133 avatars1.githubusercontent.com
151.101.108.133 avatars2.githubusercontent.com
151.101.108.133 avatars3.githubusercontent.com
151.101.108.133 avatars4.githubusercontent.com
151.101.108.133 avatars5.githubusercontent.com
151.101.108.133 avatars6.githubusercontent.com
151.101.108.133 avatars7.githubusercontent.com
151.101.108.133 avatars8.githubusercontent.com

2022 Github无法访问 简单几步解决

如果无法编辑,鼠标右键打开文件属性将“只读”取消勾选并应用保存

2022 Github无法访问 简单几步解决

Win+R打开运行框,输入cmd打开命令窗口,输入ipconfig/flushdns命令会提示以下信息

2022 Github无法访问 简单几步解决

然后就可以愉快的访问Github了!

如果你动手能力强你也可以搭建一个GitHub加速器:基于Cloudflare搭建属于自己的GitHub加速站

本文链接:https://www.ahhhhfs.com/18458/

  1. 转载请保留原文链接谢谢!
  2. 本站所有资源文章出自互联网收集整理,本站不参与制作,如果侵犯了您的合法权益,请联系本站我们会及时删除。
  3. 本站发布资源来源于互联网,可能存在水印或者引流等信息,请用户擦亮眼睛自行鉴别,做一个有主见和判断力的用户。
  4. 本站资源仅供研究、学习交流之用,若使用商业用途,请购买正版授权,否则产生的一切后果将由下载用户自行承担。
  5. 联系方式(#替换成@):feedback#abskoop.com