Skip to content

Instantly share code, notes, and snippets.

@itsliamjones
Created August 11, 2016 11:14
Show Gist options
  • Save itsliamjones/893ce42d09fa8483387c18676bc4d1b3 to your computer and use it in GitHub Desktop.
Save itsliamjones/893ce42d09fa8483387c18676bc4d1b3 to your computer and use it in GitHub Desktop.
Use cURL to download a GitHub repository, useful for building docker images
curl -sL https://github.com/user-or-org/repo/archive/sha1-or-ref.tar.gz | tar xz
Replace user-or-org, repo, and sha1-or-ref accordingly.
If you want a zip file instead of a tarball, specify .zip instead of .tar.gz suffix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment