Skip to content

Instantly share code, notes, and snippets.

@eddies
Created July 3, 2013 07:21
Show Gist options
  • Save eddies/5916060 to your computer and use it in GitHub Desktop.
Save eddies/5916060 to your computer and use it in GitHub Desktop.
Updating an existing GitHub authorization via HTTP PATCH to public_repo only (e.g. prose.io, which defaults to the more permissive "repo").
# List your authorizations (substituting your own GitHub username for <user>)
curl -u <user> https://api.github.com/authorizations
# Update the scope of a specific authorization (substitute a specific id for <id>) to "public_repo"
curl -u <user> --request PATCH https://api.github.com/authorizations/<id> --header "Content-Type:application/json" --data '{"scopes":["public_repo"]}'
# Reference: http://developer.github.com/v3/oauth/#oauth-authorizations-api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment