GitHub访问慢解决方案

配置hosts文件

  • Windows hosts文件位置
C:\Windows\System32\drivers\etc\hosts
  • Linux hosts文件位置
/ect/hosts

修改hosts文件

追加以下内容

# GitHub Start 
192.30.253.112 github.com 
192.30.253.119 gist.github.com 
151.101.100.133 assets-cdn.github.com 
151.101.100.133 raw.githubusercontent.com 
151.101.100.133 gist.githubusercontent.com 
151.101.100.133 cloud.githubusercontent.com 
151.101.100.133 camo.githubusercontent.com 
151.101.100.133 avatars0.githubusercontent.com 
151.101.100.133 avatars1.githubusercontent.com 
151.101.100.133 avatars2.githubusercontent.com 
151.101.100.133 avatars3.githubusercontent.com 
151.101.100.133 avatars4.githubusercontent.com 
151.101.100.133 avatars5.githubusercontent.com 
151.101.100.133 avatars6.githubusercontent.com 
151.101.100.133 avatars7.githubusercontent.com 
151.101.100.133 avatars8.githubusercontent.com 
# GitHub End

刷新DNS

  • Windows
ipconfig /flushdns
  • Linux
centos6:
sudo /etc/init.d/networking restart 
centos7:
systemctl restart network

原文地址

https://www.zhangbj.com/p/28.html

你可能感兴趣的:(GitHub,github)