@@ -211,38 +211,22 @@ Now restart Vim and run `:BundleInstall`.
211211
212212## Setup:
213213
214- ### Basic Authentication
214+ This plugin supports both basic and two-factor authentication using GitHub
215+ API v3. The plugin stores its credentials in ` ~/.gist-vim ` .
215216
216- If you don't have two-factor authentication enabled, follow the
217- instructions in this section.
217+ First, you need to set your GitHub username in git's global configuration:
218218
219- This plugin uses GitHub API v3. Setting value is stored in ` ~/.gist-vim ` .
220- gist-vim have two ways to access APIs.
219+ $ git config --global github.user <username>
221220
222- First, you need to set your Github username in global git config:
221+ Then gist-vim will ask for your password in order to create an access
222+ token. If you have two-factor authentication enabled, gist-vim will also
223+ prompt you to enter the two-factor key you receive.
223224
224- $ git config --global github.user Username
225-
226- Then, gist.vim will ask for your password to create an authorization when you
227- first use it. The password is not stored and only the OAuth access token will
228- be kept for later use. You can revoke the token at any time from the list of
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 ] .
225+ Whichever type of authentication you use, your GitHub password will not be
226+ stored, only a OAuth access token produced specifically for gist-vim. The
227+ token is stored in ` ~/.gist-vim ` . If you stop using the plugin, you can
228+ easily remove this file. To revoke the associated GitHub token, go to the
229+ list of [ "Authorized applications" on GitHub's "Account Settings"
230+ page] [ uas ] .
247231
248232[ uas ] : https://github.com/settings/applications
0 commit comments