1、编辑/etc/hosts
sudo vim /etc/hosts
2、在hosts文件末尾添加如下格式:
192.30.253.112 github.com
151.101.44.249 github.global.ssl.fastly.net
3、更新DNS缓存
sudo /etc/init.d/networking restart
原文:https://blog.csdn.net/DlMmU/article/details/79562021