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,解决!

相关推荐
老师用之于民13 小时前
【DAY21】Linux软件编程基础&Shell 命令、脚本及系统管理实操
linux·运维·chrome·经验分享·笔记·ubuntu
qinyia17 小时前
通过本地构建解决Cartographer编译中absl依赖缺失问题
linux·运维·服务器·mysql·ubuntu
郝亚军17 小时前
ubuntu启一个udp server,由一个client访问
linux·ubuntu·udp
予枫的编程笔记18 小时前
【Linux入门篇】Linux入门不踩坑:内核、发行版解析+环境搭建全流程
linux·ubuntu·centos·vmware·xshell·linux入门·linux环境搭建
hampeter19 小时前
【填坑指南】Trae/VS Code 远程连接 Ubuntu,终端总是自动激活特定的 Conda 环境?三招教你彻底解决!
linux·ubuntu·conda·trae
Mr_liu_66620 小时前
ubuntu:beyond compare 4 This license key has been revoked——————转载拼接
linux·运维·ubuntu
划水的code搬运工小李21 小时前
Ubuntu下挂载NTFS格式磁盘
linux·运维·ubuntu
CS_Zero21 小时前
Ubuntu系统安装CH340&CH341串口驱动
linux·ubuntu
达子6661 天前
Ubuntu的Gparted 无法扩展内存 报错umount: /sdb1: target is busy
linux·运维·ubuntu
奋斗者1号1 天前
OpenClaw 部署方式对比:云端、WSL、Mac 本机、Ubuntu 虚拟机(2026年2月最新主流实践)
linux·ubuntu·macos