




GitHub国内访问慢源于网络链路问题,可通过镜像站提速:kgithub.com等用于网页浏览,ghproxy.com用于下载,github.com.cnpmjs.org等用于克隆,但均不支持登录和私有库。
GitHub 官网在国内访问慢,不是因为网站本身问题,而是网络链路导致的延迟和连接不稳定。直接用镜像站替代原域名,不改配置、不装插件、不,就能明显提速——浏览、下载、克隆都支持,只是多数镜像不支持登录账号。
想快速打开项目主页、读 README、查提交记录,不用 clone,直接浏览器访问即可:
https://github.com/xxx/yyy 改成 https://kgithub.com/xxx/yyy,加载快、界面一致,适合日常查阅
https://hub.fastgit.org/xxx/yyy,页面响应快,但点 Sign in 会被拦截,不能登录github.com 替换为 g.nite07.org,稳定性较好,适合长期习惯性使用从 GitHub 下载单个文件(尤其是 release 里的 zip、bin、model 等大文件),原链接常卡死或失败。用代理前缀可绕过限速:
https://ghproxy.com/,例如:https://github.com/pytorch/vision/raw/main/setup.py →https://ghproxy.com/https://github.com/pytorch/vision/raw/main/setup.py
github.com 换成 hf-mirror.com,如:https://hf-mirror.com/huggingface/transformers/resolve/main/pytorch_model.bin
用 git clone 下载整个仓库时,国内直连容易超时或中断。替换域名是最简单有效的提速方式:
git clone https://github.com.cnpmjs.org/vuejs/core.git
git clone https://gitclone.com/github.com/facebookresearch/llama.git
github.com 请求自动走清华镜像:git config --global url."https://mirrors.tuna.tsinghua.edu.cn/git/".insteadof "https://github.com/"
镜像本质是第三方同步服务,使用时注意几点:
gitclone.com 或 hub.fastgit.org,它们对大文件支持更成熟