常用 GitHub 镜像站点
GHProxy 代理下载(推荐)
- 地址:
https://mirror.ghproxy.com/ - 特点:支持通过代理加速 GitHub 文件下载和克隆,无需修改仓库地址。
- 使用示例:
-
克隆仓库:在
git clone命令中直接使用代理地址:git clone https://mirror.ghproxy.com/https://github.com/user/repo.git -
下载文件:在原 GitHub 文件链接前添加
https://mirror.ghproxy.com/,例如:原下载链接:
https://github.com/user/repo/releases/download/v1.0/file.zip代理链接:https://mirror.ghproxy.com/https://github.com/user/repo/releases/download/v1.0/file.zip
-
FastGit 镜像
- 地址:
https://hub.fastgit.org/ - 特点:完整同步 GitHub 内容,支持浏览和下载,但无法登录 GitHub 账户。
- 使用示例:将原 GitHub 链接中的
github.com替换为hub.fastgit.org,例如:原链接:https://github.com/user/repo 镜像链接:https://hub.fastgit.org/user/repo
CNPMJS 镜像
- 地址:
https://github.com.cnpmjs.org/ - 特点:类似 FastGit,提供镜像同步服务,同样不支持登录。
- 使用示例:替换域名部分:
原链接:https://github.com/user/repo 镜像链接:https://github.com.cnpmjs.org/user/repo
其他加速方案
域名前缀修改
- 注意:此类前缀可能不稳定,建议优先使用官方镜像。
- 在任意 GitHub 链接前添加
521或kk,例如:521 前缀:https://521github.com/user/repo kk 前缀:https://kkgithub.com/user/repo
浏览器插件加速
- 安装油猴脚本或 GitHub 加速插件(如 GitHub Proxy),通过本地代理优化访问速度。
- 插件地址:需自行搜索可靠来源(部分插件可能失效)。
代码示例(克隆仓库)
# 使用 GHProxy 加速克隆
git clone https://mirror.ghproxy.com/https://github.com/user/repo.git
git https://hub.fastgit.org/user/repo.git

