SaltyCrane Blog — Notes on JavaScript and web development

How to download a tarball from github using curl

The -L option is the key. It allows curl to redirect to the next URL. Here's how to download a tarball from github and untar it inline:

$ curl -L https://github.com/pinard/Pymacs/tarball/v0.24-beta2 | tar zx 

Via http://support.github.com/discussions/repos/1789-you-cant-download-a-tarball-with-curl

Alternatively, using wget:

$ wget --no-check-certificate https://github.com/pinard/Pymacs/tarball/v0.24-beta2 -O - | tar xz 

Comments