0
点赞
收藏
分享

微信扫一扫

Windows打不开GitHub(打开慢)

微信关注公众号:夜寒信息

致力于为每一位用户免费提供更优质技术帮助与资源供给,感谢支持!


       因为Github是国外网站,所以经常会遇到打不开的问题,并且有时能打开但是网速好慢,以下是解决办法。

一、遇到这个问题我们需要修改host文件,电脑的host文件一般在这个地址,只需复制在我的电脑导航栏粘贴即可

C:\Windows\System32\Drivers\etc


       打开后我们会看到这个界面,然后我们将host以文本形式打开(注意打开的是系统文件,不要打开错了)

Windows打不开GitHub(打开慢)_系统文件

二、我们将host文件以记事本方式打开,然后在文件底部加上以下文字:

#github
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

Windows打不开GitHub(打开慢)_保存文件_02

然后我们ctrl+s保存文件即可。

注:

192.30.253.112是查找的github的网址

151.101.113.194是查找github.global.ssl.fastly.net网址


三、当然,有很多同学会遇到以下问题,在保存文件时系统提示这是系统文件无法更改。这种问题我们也有两种解决方式。


(1)

       我们右键点击host->选择属性,然后我们在下面找到属性栏,将只读取消勾选,这样我们就可以保存了。

Windows打不开GitHub(打开慢)_系统文件_03


(2)

       当然,如果还有同学有问题,我们就可以将文件复制到桌面然后按照(1)所说的将文件的只读取消勾选,然后再修改保存。之后我们再将文件复制到host所在目录,记得覆盖原文件哦。



微信关注公众号:夜寒信息

致力于为每一位用户免费提供更优质技术帮助与资源供给,感谢支持!

举报

相关推荐

0 条评论