File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -266,6 +266,9 @@ Then gist-vim will ask for your password in order to create an access
266266token. If you have two-factor authentication enabled, gist-vim will also
267267prompt you to enter the two-factor key you receive.
268268
269+ NOTE:
270+ If you want you can set it directly to ` g:github_user ` and ` g:gist_token ` .
271+
269272Whichever type of authentication you use, your GitHub password will not be
270273stored, only a OAuth access token produced specifically for gist-vim. The
271274token is stored in ` ~/.gist-vim ` . If you stop using the plugin, you can
Original file line number Diff line number Diff line change @@ -961,7 +961,9 @@ function! s:GistGetAuthHeader() abort
961961 return printf (' basic %s' , webapi#base64#b64encode (g: github_user .' :' .password))
962962 endif
963963 let auth = ' '
964- if filereadable (s: gist_token_file )
964+ if ! empty (get (g: , ' gist_token' , $GITHUB_TOKEN ))
965+ let auth = ' token ' . get (g: , ' gist_token' , $GITHUB_TOKEN )
966+ elseif filereadable (s: gist_token_file )
965967 let str = join (readfile (s: gist_token_file ), ' ' )
966968 if type (str) == 1
967969 let auth = str
You can’t perform that action at this time.
0 commit comments