github上不了

2020-10-07  本文已影响0人  大象会唱歌

1.访问 https://github.com.ipaddress.com/ 获取github的IP地址

2.在前往文件夹/etc/hosts中加入查询到的IP和域名 (需要root 权限)

例如:140.82.112.3 github.com

先复制出外面,修改后再copy回并覆盖hosts。

3.在终端再输以下指令刷新DNS(需要root 权限)

sudo killall -HUP mDNSResponder;say DNS cache has been flushed

4.ping github.com就显示可以了

上一篇 下一篇

猜你喜欢

热点阅读