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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With