Github无法访问
背景
GitHub的服务器在国外,有时候加载速度慢甚至无法访问是一件很头疼的事情。不想每回都要开***,或者上网搜索解决方法,所以用这篇文章记录解决方法。
修改host
1.原理:绕过DNS解析,直接使用本地DNS记录进行直接跳转
2.步骤:
通过cmd,Ping github.com,记录IP,如 [192.30.253.113]
DNS查询,选一个TTL值小的IP
修改HOST, C:\Windows\System32\drivers\etc\hosts
{
Windows 系统:C:\Windows\System32\drivers\etc\hosts
Linux 系统:/etc/hosts
Mac(苹果电脑)系统:/etc/hosts
Android(安卓)系统:/system/etc/hosts
iPhone(iOS)系统:/etc/hosts
}
{
xx.xx.xx.xx www.github.com
}
刷新本地DNS缓存:在cmd中输入 ipconfig /flushdns3.补充
1.Github520
2.DNS查询网站:
1
2
3
3.GitHub镜像源(不用登录账号)
1
2
3
4.他人教程:
csdn
提高国内访问 github 速度的 9 种方法!

京公网安备 11010502036488号