Github登录不上去解决办法(win10)

1、win10系统中:

修改hosts文件-解析dns。文件位置:

C:\Windows\System32\drivers\etc

可以用文本打开,添加dns解析:(复制到hosts最后即可)

[
复制代码

](javascript:void(0); "复制代码")

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

[
复制代码

](javascript:void(0); "复制代码")

2、ubuntu系统中:

修改hosts文件,文件位置:(用vim打开在最后添加同上的dns解析)

sudo vim /etc/hosts

3、win10更新dns:

ipconfig /flushdns

4、ubuntu更新dns:

sudo /etc/init.d/dns-clean start

补充:更新完后重启浏览器。

[
Github登录不上去解决办法(win10)_第1张图片
image

](javascript:void(0))

dns解析服务器IP的获得:

在dns解析网址中输入要解析的域名,点击检索,找TTL值最小的IP,添加进hosts,做为域名解析。

你可能感兴趣的:(Github登录不上去解决办法(win10))