Github 无法正常访问?一招解决

查询IP网址: https://ip.chinaz.com/

主页如下:

分别查询以下三个网址的IP:

github.com

github.global.ssl.fastly.net

assets-cdn.github.com

修改 hosts 文件:

将 /etc/hosts 复制到 home 下

sudo cp /etc/hosts ./

gedit hosts

在底下添加:

xxx.xx.xx.x github.com

xxx.xx.xx.x github.global.ssl.fastly.net

xxx.xx.xx.x assets-cdn.github.com

xxx.xx.xx.x assets-cdn.github.com

xxx.xx.xx.x assets-cdn.github.com

xxx.xx.xx.x assets-cdn.github.com

xxx.xx.xx.x 是你在网站查询到的IP,注意对应好后面的网址

最后,再将 hosts 拷贝回 /etc/hosts

正常关掉浏览器,重启电脑,OK,解决!

相关推荐
一心0922 小时前
ubuntu 20.04.6 sudo 源码包在线升级到1.9.17p1
运维·ubuntu·sudo·漏洞升级
好好学习啊天天向上2 小时前
世上最全:ubuntu 上及天河超算上源码编译llvm遇到的坑,cmake,ninja完整过程
linux·运维·ubuntu·自动性能优化
snoopyfly~7 小时前
Ubuntu 24.04 LTS 服务器配置:安装 JDK、Nginx、Redis。
java·服务器·ubuntu
BD_Marathon7 小时前
Ubuntu下Tomcat的配置
linux·ubuntu·tomcat
BD_Marathon7 小时前
Ubuntu:Tomcat里面的catalina.sh
linux·ubuntu·tomcat
BD_Marathon7 小时前
设置LInux环境变量的方法和区别_Ubuntu/Centos
linux·ubuntu·centos
zhaowangji8 小时前
ubuntu 20.04 安装中文输入法 (sougou pin yin)
linux·ubuntu
Maki Winster15 小时前
Peek-Ubuntu上Gif录制工具-24.04LTS可装
linux·ubuntu·peek
Maki Winster16 小时前
在 Ubuntu 下配置 oh-my-posh —— 普通用户 + root 各自使用独立主题(共享可执行)
linux·运维·ubuntu
Imagine Miracle19 小时前
Ubuntu for ARM 更换为阿里云镜像源
arm开发·ubuntu·阿里云