Skip to content

Instantly share code, notes, and snippets.

@jswank
Created January 22, 2013 16:34
Show Gist options
  • Save jswank/4596088 to your computer and use it in GitHub Desktop.
Save jswank/4596088 to your computer and use it in GitHub Desktop.

Authentication

gister uses GitHub OAuth authentication. A token must be generated once and then can be used for all your gister needs. To generate an OAuth token, run:

$ curl -s -u github_username \
       -d '{"scopes": ["gist"], "note": "commandline gister"}' \
       https://api.github.com/authorizations

The "token" return value is your token. This token can be revoked anytime by visting https://github.com/settings/applications

There are two ways to tell gister what token to use.

Set the key gist.token:

$ git config --global --add gist.token "my token"
$ gister example.txt

Specify the token as an environment variable:

$ export GIST_OAUTH="your oauth token"
$ gister example.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment