在国内环境,Github经常会遇到打不开的问题,并且有时能打开但是网速好慢,以下是解决办法。
1、通过站长工具找出DNS地址:进入站长工具网站的域名解析网址:http://tool.chinaz.com/dns/ ,在A类型的查询中输入github.com,找出最快的IP地址;
2.找到hosts文件拖到桌面
3.我们将host文件以记事本方式打开,然后在文件底部加上以下文字:
#github
20.205.243.166 github.com
20.205.243.166 gist.github.com
20.205.243.166 assets-cdn.github.com
20.205.243.166 raw.githubusercontent.com
20.205.243.166 gist.githubusercontent.com
20.205.243.166 cloud.githubusercontent.com
20.205.243.166 camo.githubusercontent.com
20.205.243.166 avatars0.githubusercontent.com
20.205.243.166 avatars1.githubusercontent.com
20.205.243.166 avatars2.githubusercontent.com
20.205.243.166 avatars3.githubusercontent.com
20.205.243.166 avatars4.githubusercontent.com
20.205.243.166 avatars5.githubusercontent.com
20.205.243.166 avatars6.githubusercontent.com
20.205.243.166 avatars7.githubusercontent.com
20.205.243.166 avatars8.githubusercontent.com
5:放回原位覆盖