GitHub可能出现无法访问情况,解决方案如下:
1.访问https://github.com.ipaddress.com/,查看GitHub的ip地址,如下图:
2.将IP地址添加进hosts文件中。Win10 hosts文件位置:C:\\Windows\\System32\\drivers\\etc添加格式为:
140.82.114.4 github.com
3.打开cmd
,刷新dns
缓存即可
ipconfig /flushdns
4.还会存在GitHub中头像不显示情况,参考资料可解决。
5.使用软件UsbEAm Hosts Editor可直接进行修改。
参考资料:
- 头像不显示问题:https://mp.weixin.qq.com/s/I4k18fj0GyW-ysp9UKLMfg
- ipaddress地址:https://github.com.ipaddress.com/
- UsbEAm Hosts Editor软件解决方案https://www.dogfight360.com/blog/475/