Permalink
Browse files

No more github token. Use your password instead.

  • Loading branch information...
1 parent 528ebb2 commit 3651d3553270eaca66df5d80214d9d50da1da8dc @defunkt committed Mar 20, 2012
Showing with 17 additions and 19 deletions.
  1. +9 −11 README.markdown
  2. +2 −2 lib/gist.rb
  3. +6 −6 man/gist.1.ron
View
@@ -56,33 +56,31 @@ the quick brown fox jumps over the lazy dog
Authentication
--------------
-There are two ways to set GitHub user and token info:
+There are two ways to set GitHub user and password info:
-Using env vars GITHUB_USER and GITHUB_TOKEN:
+Using env vars GITHUB_USER and GITHUB_PASSWORD:
```bash
$ export GITHUB_USER="your-github-username"
-$ export GITHUB_TOKEN="your-github-token"
+$ export GITHUB_PASSWORD="your-github-password"
$ gist ~/example
```
-Or by having your git config set up with your GitHub username and token.
+Or by having your git config set up with your GitHub username and password.
```bash
git config --global github.user "your-github-username"
-git config --global github.token "your-github-token"
+git config --global github.password "your-github-password"
```
-You can find your token under [your account](https://github.com/account).
-
-You can also define github.token to be a command which returns the
-actual token on stdout by setting the variable to a command string
+You can also define github.password to be a command which returns the
+actual password on stdout by setting the variable to a command string
prefixed with `!`. For example, the following command fetches the
-token from a password item named "github.token" on the Mac OS
+password from an item named "github.password" on the Mac OS
Keychain:
```bash
-token = !security 2>&1 >/dev/null find-generic-password -gs github.token | ruby -e 'print $1 if STDIN.gets =~ /^password: \\\"(.*)\\\"$/'
+password = !security 2>&1 >/dev/null find-generic-password -gs github.password | ruby -e 'print $1 if STDIN.gets =~ /^password: \\\"(.*)\\\"$/'
```
Defaults
View
@@ -242,8 +242,8 @@ def defaults
end
# Reads a config value using:
- # => Environement: GITHUB_TOKEN, GITHUB_USER
- # like vim gist plugin
+ # => Environment: GITHUB_PASSWORD, GITHUB_USER
+ # like vim gist plugin
# => git-config(1)
#
# return something useful or nil
View
@@ -23,7 +23,7 @@ browser, too.
`gist`'s default mode of operation is to read content from standard
input and create a public, text gist without description from it, tied
-to your GitHub account if you user and token are provided (see
+to your GitHub account if you user and passwordare provided (see
`CONFIGURATION`).
These options can be used to change this behavior:
@@ -52,13 +52,13 @@ You may additionally ask for help:
## AUTHENTICATION
-There are two ways to set GitHub user and token info:
+There are two ways to set GitHub user and password info:
- * Using environment vars GITHUB_USER and GITHUB_TOKEN
+ * Using environment vars GITHUB_USER and GITHUB_PASSWORD
- $ export GITHUB_USER=johndoe
- $ export GITHUB_TOKEN=mysecretgithubtoken
- $ gist ~/example
+ $ export GITHUB_USER=johndoe
+ $ export GITHUB_PASSWORD=mysecretgithubpassword
+ $ gist ~/example
* Using git-config(1)

1 comment on commit 3651d35

@joliss
joliss commented on 3651d35 May 1, 2012

Why no more? hub supports it. This makes me sad.

Please sign in to comment.