Skip to content

Commit 3651d35

Browse files
committed
No more github token. Use your password instead.
1 parent 528ebb2 commit 3651d35

File tree

3 files changed

+17
-19
lines changed

3 files changed

+17
-19
lines changed

README.markdown

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,33 +56,31 @@ the quick brown fox jumps over the lazy dog
5656

5757
Authentication
5858
--------------
59-
There are two ways to set GitHub user and token info:
59+
There are two ways to set GitHub user and password info:
6060

61-
Using env vars GITHUB_USER and GITHUB_TOKEN:
61+
Using env vars GITHUB_USER and GITHUB_PASSWORD:
6262

6363
```bash
6464
$ export GITHUB_USER="your-github-username"
65-
$ export GITHUB_TOKEN="your-github-token"
65+
$ export GITHUB_PASSWORD="your-github-password"
6666
$ gist ~/example
6767
```
6868

69-
Or by having your git config set up with your GitHub username and token.
69+
Or by having your git config set up with your GitHub username and password.
7070

7171
```bash
7272
git config --global github.user "your-github-username"
73-
git config --global github.token "your-github-token"
73+
git config --global github.password "your-github-password"
7474
```
7575

76-
You can find your token under [your account](https://github.com/account).
77-
78-
You can also define github.token to be a command which returns the
79-
actual token on stdout by setting the variable to a command string
76+
You can also define github.password to be a command which returns the
77+
actual password on stdout by setting the variable to a command string
8078
prefixed with `!`. For example, the following command fetches the
81-
token from a password item named "github.token" on the Mac OS
79+
password from an item named "github.password" on the Mac OS
8280
Keychain:
8381

8482
```bash
85-
token = !security 2>&1 >/dev/null find-generic-password -gs github.token | ruby -e 'print $1 if STDIN.gets =~ /^password: \\\"(.*)\\\"$/'
83+
password = !security 2>&1 >/dev/null find-generic-password -gs github.password | ruby -e 'print $1 if STDIN.gets =~ /^password: \\\"(.*)\\\"$/'
8684
```
8785

8886
Defaults

lib/gist.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ def defaults
242242
end
243243

244244
# Reads a config value using:
245-
# => Environement: GITHUB_TOKEN, GITHUB_USER
246-
# like vim gist plugin
245+
# => Environment: GITHUB_PASSWORD, GITHUB_USER
246+
# like vim gist plugin
247247
# => git-config(1)
248248
#
249249
# return something useful or nil

man/gist.1.ron

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ browser, too.
2323

2424
`gist`'s default mode of operation is to read content from standard
2525
input and create a public, text gist without description from it, tied
26-
to your GitHub account if you user and token are provided (see
26+
to your GitHub account if you user and passwordare provided (see
2727
`CONFIGURATION`).
2828
2929
These options can be used to change this behavior:
@@ -52,13 +52,13 @@ You may additionally ask for help:
5252

5353
## AUTHENTICATION
5454

55-
There are two ways to set GitHub user and token info:
55+
There are two ways to set GitHub user and password info:
5656

57-
* Using environment vars GITHUB_USER and GITHUB_TOKEN
57+
* Using environment vars GITHUB_USER and GITHUB_PASSWORD
5858

59-
$ export GITHUB_USER=johndoe
60-
$ export GITHUB_TOKEN=mysecretgithubtoken
61-
$ gist ~/example
59+
$ export GITHUB_USER=johndoe
60+
$ export GITHUB_PASSWORD=mysecretgithubpassword
61+
$ gist ~/example
6262

6363
* Using git-config(1)
6464

0 commit comments

Comments
 (0)