Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download the Release tar file from Github?

Tags:

git

github

I have a project by name TestProject in Github and I have created a Release with version v1.0.0. 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). 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. 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

tar: Unrecognized archive format tar: Error exit delayed from previous errors.

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.

How do I get this file when I say curl?

like image 714
Maga Avatar asked Jan 28 '26 15:01

Maga


1 Answers

Add -L flag to the curl command in order to follow redirects.

example:

curl -O -L https://github.com/gulpjs/gulp/archive/v3.9.1.tar.gz
like image 106
Marcin Dusza Avatar answered Jan 31 '26 08:01

Marcin Dusza