众所周知GitHub在境内服务器的连通性都不太好,于是我们可以指定ip,达到稳定的效果。
首先
1 |
sudo vi /etc/hosts |
然后加入如下内容:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# GitHub Start 192.30.253.112 github.com 192.30.253.119 gist.github.com 199.232.28.133 assets-cdn.github.com 199.232.28.133 raw.githubusercontent.com 199.232.28.133 gist.githubusercontent.com 199.232.28.133 cloud.githubusercontent.com 199.232.28.133 camo.githubusercontent.com 199.232.28.133 avatars0.githubusercontent.com 199.232.28.133 avatars1.githubusercontent.com 199.232.28.133 avatars2.githubusercontent.com 199.232.28.133 avatars3.githubusercontent.com 199.232.28.133 avatars4.githubusercontent.com 199.232.28.133 avatars5.githubusercontent.com 199.232.28.133 avatars6.githubusercontent.com 199.232.28.133 avatars7.githubusercontent.com 199.232.28.133 avatars8.githubusercontent.com 185.199.110.154 github.githubassets.com # GitHub End |
然后就完事了,看看是否能正常连接GitHub。
·这是博主最新找的一份ip,如果ip失效了,可以在去https://githubusercontent.com.ipaddress.com/raw.githubusercontent.com,找到ip替换即可。
礼品代发、一件代发快递就发www.danhw.com