Skip to content

GitHub镜像站下载文件或克隆仓库

2022-04-05

在某些特殊时段或特殊网段,github都会呈现和谷歌一样的访问结果

这里介绍一个镜像下载站:


用法:粘贴github链接(code的zip 或 release中的source code和文件)

以我的github项目lightmysql为例:

  • code zip:https://github.com/Danny-Yxzl/lightmysql/archive/refs/heads/master.zip
  • release中的source code:https://github.com/Danny-Yxzl/lightmysql/archive/refs/tags/1.0.5.tar.gz
  • 一个别的项目中的release附件:https://github.com/qishibo/AnotherRedisDesktopManager/releases/download/v1.4.9/Another-Redis-Desktop-Manager.1.4.9.exe

github的下载采用直链,如果能访问只是速度慢的话我们可以直接复制来;但是有时完全无法访问,这时候我们可以通过code下载生成链接的规律下载文件:

https://github.com/用户名/项目名/archive/refs/heads/分支名称.zip

在clone和wget等操作中也可使用该镜像:

# git clone
git clone https://mirror.ghproxy.com/https://github.com/Danny-Yxzl/lightmysql

# wget
wget https://mirror.ghproxy.com/https://github.com/Danny-Yxzl/lightmysql/archive/refs/heads/master.zip
wget https://mirror.ghproxy.com/https://raw.githubusercontent.com/Danny-Yxzl/lightmysql/1.0.5/lightmysql.py

# curl
curl -O https://mirror.ghproxy.com/https://github.com/Danny-Yxzl/lightmysql/archive/refs/heads/master.zip
curl -O https://mirror.ghproxy.com/https://raw.githubusercontent.com/Danny-Yxzl/lightmysql/1.0.5/lightmysql.py

Ukraine 在俄罗斯对乌克兰发动的野蛮的侵略战争中矢志不渝地支持乌克兰