最近GitHub无法访问?排好队,一步一步来!
- 进入hosts文件夹
command + shift + G
输入
/private/etc/hosts
enter
- 修改hosts问件
hosts文件夹不可修改,可拷贝一份到桌面,打开桌面的hosts文件
添加
# Github Hosts
# update: 2021-01-26
140.82.114.3 github.com
140.82.114.10 nodeload.github.com
140.82.113.5 api.github.com
140.82.114.10 codeload.github.com
185.199.108.153 training.github.com
#185.199.108.153 assets-cdn.github.com
185.199.108.153 documentcloud.github.com
185.199.108.154 help.github.com
185.199.108.153 githubstatus.com
199.232.69.194 github.global.ssl.fastly.net
199.232.96.133 raw.github.com
199.232.96.133 raw.githubusercontent.com
199.232.96.133 cloud.githubusercontent.com
199.232.96.133 gist.githubusercontent.com
199.232.96.133 marketplace-screenshots.githubusercontent.com
199.232.96.133 repository-images.githubusercontent.com
199.232.96.133 user-images.githubusercontent.com
199.232.96.133 desktop.githubusercontent.com
199.232.5.194 github.global.ssl.fastly.net
199.232.96.133 avatars.githubusercontent.com
199.232.96.133 avatars0.githubusercontent.com
199.232.96.133 avatars1.githubusercontent.com
199.232.96.133 avatars2.githubusercontent.com
199.232.96.133 avatars3.githubusercontent.com
199.232.96.133 avatars4.githubusercontent.com
199.232.96.133 avatars5.githubusercontent.com
199.232.96.133 avatars6.githubusercontent.com
199.232.96.133 avatars7.githubusercontent.com
199.232.96.133 avatars8.githubusercontent.com
# End of the section
删除/private/etc/
路径下的hosts文件
将拷贝修改后的hosts文件拖入/private/etc/
下
删除和拖入hosts文件 可能需要输入密码
- 终端操作
打开终端输入sudo killall -HUP mDNSResponder
enter
输入密码
enter
至此,打开你的浏览器,就可以访问GitHib 了!!!
更新
问题:
gitHub push 到远程 可能会出现的443错误
解决方式:
注释上文代码
185.199.108.153 assets-cdn.github.com
END
网友评论