Skip to content

Commit 9c21648

Browse files
committed
Merge pull request mattn#151 from telemachus/two-factor
Add two-factor authentication setup instructions
2 parents 2c0bcf5 + cec9546 commit 9c21648

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

README.mkd

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ Now restart Vim and run `:BundleInstall`.
211211

212212
## Setup:
213213

214+
### Basic Authentication
215+
216+
If you don't have two-factor authentication enabled, follow the
217+
instructions in this section.
218+
214219
This plugin uses GitHub API v3. Setting value is stored in `~/.gist-vim`.
215220
gist-vim have two ways to access APIs.
216221

@@ -221,4 +226,23 @@ First, you need to set your Github username in global git config:
221226
Then, gist.vim will ask for your password to create an authorization when you
222227
first use it. The password is not stored and only the OAuth access token will
223228
be kept for later use. You can revoke the token at any time from the list of
224-
["Authorized applications" on GitHub's "Account Settings" page](https://github.com/settings/applications).
229+
["Authorized applications" on GitHub's "Account Settings" page][uas].
230+
231+
### Two-factor Authentication
232+
233+
If you use two-factor authentication, you will need to set things up
234+
slightly differently. Luckily, it's not hard at all.
235+
236+
First, go to your [user application settings page][uas] on GitHub. In the
237+
section 'Personal access tokens', click the button to 'Generate new
238+
token'. Name the token something easy to remember, like 'gist-vim', and
239+
then copy the token itself. Finally paste the token you just made into
240+
`~/.gist-vim`. (Create that file, if it doesn't already exist.) The final
241+
result should look like this:
242+
243+
token <paste-your-token-here>
244+
245+
Done! You can revoke this token at any time from your [application
246+
settings][uas].
247+
248+
[uas]: https://github.com/settings/applications

0 commit comments

Comments
 (0)