一句话交代:
GitHub 对大陆 IP 开始“冷暴力”,魔法也救不了,快上国内镜像站或者平替平台续命吧!
————————————————————
宝子们,今天(2025 年 4 月 13 日)GitHub 对大陆 IP 开始“冷暴力”,git clone失效!直接给你来个 403 Forbidden,!
官方社区已经炸锅,欢迎大家上去吐槽:
https://github.com/orgs/community/discussions/156515?utm_source=chatgpt.com
🚫 亲测结果:
即使使用了全局魔法,克隆个公开仓库 octocat/Hello-World,但是结果凉凉——403 错误!本地防火墙、SSL、时间同步都排查了,还是不行!怎么办!!!
git clone https://github.com/octocat/Hello-World.git
# 输出:
# Cloning into 'Hello-World'...
# fatal: unable to access 'https://github.com/octocat/Hello-World.git/':
# The requested URL returned error: 403
✅解决方案:别慌,咱有办法!
1️⃣ 国内镜像站:kkgithub.com
目前唯一能用的国内镜像站,直接上:
git clone https://kkgithub.com/octocat/Hello-World.git
不过这站是“民间救援队”,高峰期可能抽风,建议凌晨三点去试试。
配置教程:三步教你搞定镜像站
1. 全局配置(懒人版)
git config --global url."https://kkgithub.com/".insteadOf https://github.com/
以后所有克隆都走镜像站,想恢复?直接执行:
git config --global --unset url."https://kkgithub.com/".insteadOf
2. 单次克隆(临时救急)
在克隆时直接使用镜像站的 URL,在原来github域名前加上kk:
git clone https://kkgithub.com/octocat/Hello-World.git
此方法仅对本次操作生效,不影响全局配置,是不是很帅。
2️⃣ 平替平台:Gitee
直接把项目搬到 Gitee,从此告别 GitHub 的“冷暴力”,功能一样,网速飞起!