Skip to content

Instantly share code, notes, and snippets.

@barrbrain
Forked from dropwhile/.netrc
Last active December 15, 2015 11:09
Show Gist options
  • Save barrbrain/5250660 to your computer and use it in GitHub Desktop.
Save barrbrain/5250660 to your computer and use it in GitHub Desktop.
[url "https://github.com/"]
insteadof = git@github.com:
# .netrc
machine github.com login <token>
# Explicitly add gist rather than exposing token to all github subdomains
machine gist.github.com login <token>

$ curl -u 'username' -d '{ "scopes": ["repo"], "note": "Command-line access" }'
https://api.github.com/authorizations

Enter host password for user 'username': [type password]
{
  "scopes": [
    "repo"
  ],
  "token": "your_token",
  "app": {
    "url": "http://developer.github.com/v3/oauth/#oauth-authorizations-api",
    "name": "Command-line access (API)"
  },
  "url": "https://api.github.com/authorizations/123456",
  "note": "Command-line access",
  "note_url": null,
  "id": 123456,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment