Skip to content

Instantly share code, notes, and snippets.

@barrbrain barrbrain/.gitconfig forked from cactus/.netrc
Last active Dec 15, 2015

Embed
What would you like to do?
[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
You can’t perform that action at this time.