简体   繁体   English

如何从Github下载Release tar文件?

[英]How to download the Release tar file from Github?

I have a project by name TestProject in Github and I have created a Release with version v1.0.0. 我在Github中有一个名为TestProject的项目,并且创建了v1.0.0版本的Release。 Once I do that and when I go the release page of the project and I see 2 links to download Source code (zip) and other says Source code (tar.gz) . 一旦这样做,当我进入项目的发布页面时,我会看到2个链接来下载Source code (zip)和其他说Source code (tar.gz) Now I need to download this via curl so I copied the URL which looks like https://github.com/../TestProject/archive/v1.0.0.tar.gz . 现在我需要通过curl下载它,所以我复制了看起来像https://github.com/../TestProject/archive/v1.0.0.tar.gz的URL。 When this files gets downloaded via curl its not a tar file cauz when I say tar -zxvf v1.0.0.tar.gz I get the below error message 当通过curl下载此文件时,它不是tar文件cauz,当我说tar -zxvf v1.0.0.tar.gz -zxvf v1.0.0.tar.gz时,出现以下错误消息

tar: Unrecognized archive format tar: Error exit delayed from previous errors. tar:无法识别的存档格式tar:错误退出由于先前的错误而延迟。

Now when I go the release page of Github and then click on the tar version, TestProject-1.0.0.tar.gz gets downloaded which is a tar file. 现在,当我转到Github的发行页面,然后单击tar版本时,将下载TestProject-1.0.0.tar.gz ,它是一个tar文件。

How do I get this file when I say curl ? 我说curl时如何获得此文件?

Add -L flag to the curl command in order to follow redirects. 将-L标志添加到curl命令中以遵循重定向。

example: 例:

curl -O -L https://github.com/gulpjs/gulp/archive/v3.9.1.tar.gz

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM