介绍
访问GitHub时,总是无法访问。
解决方案
获取域名IP
可以进入网址:https://github.com.ipaddress.com/#ipinfo查询IP地址
注:如果上面的网址进不去,可以进入这个网址: IP/服务器github.com的信息 - 站长工具获取IP地址。
# github
140.82.112.4 github.com
199.232.69.194 github.global.ssl.fastly.net
修改hosts地址
windows
打开 C:\Windows\System32\drivers\etc 找到 hosts 文件,修改之后执行
ipconfig /flushdns
linux
/etc/hosts 打开 hosts 文件
更改完成后,刷新DNS
sudo systemctl reload NetworkManager
或者
sudo systemctl restart NetworkManager