Skip to content

Instantly share code, notes, and snippets.

@doppiomacchiatto
Forked from itsliamjones/curl-repo.txt
Created January 20, 2025 23:29
Show Gist options
  • Save doppiomacchiatto/cac57ba36ac655d1333209c65b31675e to your computer and use it in GitHub Desktop.
Save doppiomacchiatto/cac57ba36ac655d1333209c65b31675e 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