【笔记】直接通过命令行下载Github上的文件

前言

直接通过命令行下载Github上的文件

下载Releases中的文件

wget

1
wget https://github.com/用户名/仓库名/releases/download/标签(版本号)/完整文件名

curl

1
curl -LJO https://github.com/用户名/仓库名/releases/download/标签(版本号)/完整文件名

下载Tags中的文件

  • 实际上也是Releases中的Source code (zip)文件

wget

1
wget https://codeload.github.com/hfiref0x/UACME/zip/refs/tags/标签(版本号)

curl

1
curl -LJO https://codeload.github.com/hfiref0x/UACME/zip/refs/tags/标签(版本号)

下载任意源码文件

wget

1
wget https://raw.githubusercontent.com/用户名/仓库名/refs/heads/分支/完整文件路径

curl

1
curl -LJO https://raw.githubusercontent.com/用户名/仓库名/refs/heads/分支/完整文件路径

完成

参考文献

CSDN——TestOps风铃
简书——DeppWang