Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to curl a git tag

Tags:

git

git-tag

curl

I want to curl a git tag through the command line:

curl -O http://someurl

But when I try to untar the file it is broken? Do anyone know what is the problem?

like image 879
einstein Avatar asked Jan 14 '23 15:01

einstein


1 Answers

You can curl a git tag from a git repos hosting service like GitHub, because it has a dedicated tarball service (like Nodeload) which provides tar (or zip). But not any other git repo out there has that same service.

See "Having trouble downloading Git archive tarballs from Private Repo" for a concrete example with GitHub (or this curl GitHub tutorial):

curl -sL --user "${username}:${password}" https://github.com/$account/$repo/tarball/$tag_name > tarball.tar

On a public repo:

curl -L https://github.com/pinard/Pymacs/tarball/v0.24-beta2 | tar zx
like image 65
VonC Avatar answered Jan 28 '23 14:01

VonC