Skip to content

Instantly share code, notes, and snippets.

@sawanoboly
Last active December 31, 2015 02:49
Show Gist options
  • Select an option

  • Save sawanoboly/7923004 to your computer and use it in GitHub Desktop.

Select an option

Save sawanoboly/7923004 to your computer and use it in GitHub Desktop.
CurlでGithub(Private)のrawが使えなくなったので対案 ref: http://qiita.com/sawanoboly/items/39abb46bc93b94b7ef87
curl -s -f -L -u 'LOGIN_NAME/token:API_TOKEN' https://raw.github.com/ORG_NAME/REPO_NAME/master/README.md
curl -s -H "Authorization: token OAUTH_TOKEN" https://api.github.com/repos/ORG_NAME/REPO_NAME/contents/PATH_TO_CONTENT | json content | base64 -D
curl -s -H "Authorization: token OAUTH_TOKEN" https://api.github.com/repos/ORG_NAME/REPO_NAME/contents/PATH_TO_CONTENT | json content | perl -MMIME::Base64 -ne 'print MIME::Base64::decode_base64($_)
check_http -H api.github.com -u /repos/MY_ORG/REPO_NAME/contents/README.md -S -k "Authorization: token OAUTH_TOKEN"
HTTP OK: HTTP/1.1 200 OK - 3366 bytes in 0.887 second response time |time=0.886742s;;;0.000000 size=3366B;;;0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment