费话不多说直接上干货
Github在中国访问很慢,有时候还打不开,可以通过修改hosts文件来加速,能得到一定的改善。
hosts文件
通过修改hosts文件,可以将指定的域名解析到特定的IP地址。所以我们可以将域名解析到速度较快的服务器,从而提升访问速度。
hosts文件路径是:C:WindowsSystem32driversetchosts
,用记事本打开即可。注意先使用管理员身份打开记事本,再打开该文件。
然后加入以下内容,保存即可:
140.82.114.4 github.com 140.82.112.10 codeload.github.com 185.199.108.153 assets-cdn.github.com 140.82.112.5 api.github.com 140.82.114.25 live.github.com 151.101.76.133 raw.githubusercontent.com 199.232.96.133 avatars.githubusercontent.com 199.232.96.133 camo.githubusercontent.com 199.232.68.133 avatars0.githubusercontent.com 199.232.68.133 avatars1.githubusercontent.com 199.232.68.133 avatars2.githubusercontent.com 199.232.68.133 avatars3.githubusercontent.com 199.232.68.133 avatars4.githubusercontent.com 199.232.68.133 avatars5.githubusercontent.com 199.232.68.133 avatars6.githubusercontent.com 199.232.68.133 avatars7.githubusercontent.com 199.232.68.133 avatars8.githubusercontent.com 199.232.68.133 avatars9.githubusercontent.comz
只要这么设置一边,只要电脑系统不重装,就一直都会很快的。
另一篇文章还介绍:《教你如何完美解决github国内打开》
文章版权声明:除非注明,否则均为老余个人博客原创文章,转载或复制请以超链接形式并注明出处。
发表评论