方法一:修改host文件,绕过DNS解析
通过访问:https://www.ipaddress.com/ 分别获取以下两个网址的ip:
(1) github.com
(2) github.global.ssl.fastly.net
然后修改系统的host文件:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
140.82.113.4 github.com
199.232.5.194 github.global.ssl.fastly.net
修改完hosts需要刷新DNS缓存:
linux:sudo /etc/init.d/networking restart
windows:ipconfig /flushdns
通过上面方法暂时解决,后面遇到新问题再补充。