我想通过命令行 curl 一个 git 标签:
curl -O http://someurl
但是当我尝试解压文件时它坏了?有谁知道问题出在哪里?
最佳答案
您可以从 GitHub 等 git repos 托管服务curl
一个 git 标签,因为它有一个 dedicated tarball service (如 Nodeload )提供 tar(或 zip)。但没有任何其他 git 存储库提供相同的服务。
有关 GitHub 的具体示例,请参阅“Having trouble downloading Git archive tarballs from Private Repo ”(或此 curl
GitHub tutorial ):
curl -sL --user "${username}:${password}" https://github.com/$account/$repo/tarball/$tag_name > tarball.tar
在 public repo 上:
curl -L https://github.com/pinard/Pymacs/tarball/v0.24-beta2 | tar zx
关于git - 无法 curl git 标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14101317/