File tree 2 files changed +6
-1
lines changed
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
266
266
token. If you have two-factor authentication enabled, gist-vim will also
267
267
prompt you to enter the two-factor key you receive.
268
268
269
+ NOTE:
270
+ If you want you can set it directly to ` g:github_user ` and ` g:gist_token ` .
271
+
269
272
Whichever type of authentication you use, your GitHub password will not be
270
273
stored, only a OAuth access token produced specifically for gist-vim. The
271
274
token 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
961
961
return printf (' basic %s' , webapi#base64#b64encode (g: github_user .' :' .password))
962
962
endif
963
963
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 )
965
967
let str = join (readfile (s: gist_token_file ), ' ' )
966
968
if type (str) == 1
967
969
let auth = str
You can’t perform that action at this time.
0 commit comments