Skip to content

Instantly share code, notes, and snippets.

@mrdrozdov
Last active August 29, 2015 14:20
Show Gist options
  • Save mrdrozdov/1d23b1464b525c340278 to your computer and use it in GitHub Desktop.
Save mrdrozdov/1d23b1464b525c340278 to your computer and use it in GitHub Desktop.
Github Repository Management Tips

Getting an OAuth Token

Navigate to: https://github.com/settings/tokens

If you plan on deleting repos, make sure to check the delete_repo permission.

List Repositories

curl https://api.github.com/users/<username>/repos

Create Repository

curl -u <oauthtoken>:x-oauth-basic -X POST -H "Content-Type: application/json" -d '{"name":"<repo>"}' https://api.github.com/user/repos

Delete Repository

curl -u <oauthtoken>:x-oauth-basic -X DELETE https://api.github.com/repos/<username>/<repo>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment