Skip to content

Instantly share code, notes, and snippets.

@madrobby
Created March 10, 2014 23:34
Show Gist options
  • Star 61 You must be signed in to star a gist
  • Fork 13 You must be signed in to fork a gist
  • Save madrobby/9476733 to your computer and use it in GitHub Desktop.
Save madrobby/9476733 to your computer and use it in GitHub Desktop.
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article: https://help.github.com/articles/creating-an-access-token-for-command-line-use
curl -H 'Authorization: token INSERTACCESSTOKENHERE' -H 'Accept: application/vnd.github.v3.raw' -O -L https://api.github.com/repos/owner/repo/contents/path
@porthunt
Copy link

porthunt commented Aug 6, 2021

I've created this simple gist in case someone needs to download a json file from a private repository and use it as a dictionary: https://gist.github.com/porthunt/b994154c054deeab7ab4073273aa75bc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment