1.进入mac终端,输入ping github.com,如下,发现可以连接,延迟也不算太高,但是网站响应极其慢,甚至打不开。
2.进入/private/etc/,查看hosts文件,是否有关于github的修改,发现其加了13.250.177.223 github.com,因此将其删去(需要复制修改),然后再替换。
3.输入ping github.com,查看是否能ping通,结果能ping通,此时打开github,如果还打不开,则将此时ping到的ip地址13.229.188.59直接复制到浏览器中连接,即通。
PING github.com (13.229.188.59): 56 data bytes
64 bytes from 13.229.188.59: icmp_seq=0 ttl=40 time=122.149 ms
64 bytes from 13.229.188.59: icmp_seq=1 ttl=40 time=117.353 ms
64 bytes from 13.229.188.59: icmp_seq=2 ttl=40 time=117.601 ms
64 bytes from 13.229.188.59: icmp_seq=3 ttl=40 time=117.898 ms
64 bytes from 13.229.188.59: icmp_seq=4 ttl=40 time=117.420 ms
64 bytes from 13.229.188.59: icmp_seq=5 ttl=40 time=117.129 ms
64 bytes from 13.229.188.59: icmp_seq=6 ttl=40 time=117.492 ms