计算机github访问不了

原因是DNS解析不到正确的地址
解决方案:修改host文件(参考 https://github.com/521xueweihan/GitHub520)

A.手动方式
复制 https://gitee.com/xueweihan/codes/6g793pm2k1hacwfbyesl464/raw?blob_name=GitHub520.yml 的内容到host并保存即可。

备注:
https://www.ipaddress.com 可以查询域名对应的 ip 地址
host文件在 windows 系统的位置:C:\Windows\System32\drivers\etc\hosts

B.自动方式,通过 SwitchHosts 工具管理host(推荐 - 每次 hosts 有更新都能及时进行更新,免去手动更新)
第一步:从 https://github.com/oldj/SwitchHosts/releases 下载window或者macOS或者linux系统的exe文件,下载安装;
第二步:新增配置
Title: 随意
Type: Remote
URL: https://gitee.com/xueweihan/codes/6g793pm2k1hacwfbyesl464/raw?blob_name=GitHub520.yml
Auto Refresh: 最好选 1 hour

posted @ 2020-10-24 22:13  heroljy  阅读(268)  评论(0编辑  收藏  举报