5.git突然无法访问

2020.06 github再次被墙。

步骤

打开C:\Windows\System32\drivers\etchost文件,添加如下:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 C:\Windows\System32\drivers\etc的'host'文件中替换原来的Github解析内容

# GitHub Start 
140.82.114.4 github.com
140.82.114.4 gist.github.com
185.199.108.153 assets-cdn.github.com
151.101.64.133 raw.githubusercontent.com
151.101.108.133 gist.githubusercontent.com
151.101.108.133 cloud.githubusercontent.com
151.101.108.133 camo.githubusercontent.com
151.101.108.133 avatars0.githubusercontent.com
151.101.108.133 avatars1.githubusercontent.com
151.101.108.133 avatars2.githubusercontent.com
151.101.108.133 avatars3.githubusercontent.com
151.101.108.133 avatars4.githubusercontent.com
151.101.108.133 avatars5.githubusercontent.com
151.101.108.133 avatars6.githubusercontent.com
151.101.108.133 avatars7.githubusercontent.com
151.101.108.133 avatars8.githubusercontent.com 
# GitHub End

其他

查询githubusercontent.com的IP地址填入也是可行的点击查询

(这样会导致github.com没法儿ping通,但是git推送下载能够正常使用)

1596345789135.png

REFERENCE

CSDN文章