vim-gist icon indicating copy to clipboard operation
vim-gist copied to clipboard

Auth via ~/.gist-vim not working

Open mklopets opened this issue 4 years ago • 9 comments

I'd been successfully using this for years, but some unknown time ago, the plugin's auth stopped working for me (possibly after a fresh install).

  • if I create a ~/.gist-vim file containing token XXXXX, I get Post failed: (with no error message after the colon)
  • if I do let g:gist_token = "XXXXX" (XXXXX being identical), everything does work as expected

The password flow doesn't trigger for me at all, even after reinstalling and deleting ~/.gist-vim

~/.gist-vim file has all the permissions I could give it. On macOS Big Sur.

mklopets avatar Aug 16 '21 14:08 mklopets

I have the same issue, maybe is because Github change the token format? ghp_xxx. But the same, with let works fine, but for now all time you need set it at the start vim session. The config file don't work

hpsaturn avatar Oct 04 '21 09:10 hpsaturn

After removing ~/.gist-vim file trying to post a gist brings a prompt to enter my password:

Gist.vim requires authorization to use the GitHub API. These settings are stored in "~/.gist-vim". If you want to revoke, do "rm ~/.gist-vim".
GitHub Password for installero:

After entering my password I got Not Found message.

installero avatar Oct 21 '21 16:10 installero

After removing ~/.gist-vim file trying to post a gist brings a prompt to enter my password:

Gist.vim requires authorization to use the GitHub API. These settings are stored in "~/.gist-vim". If you want to revoke, do "rm ~/.gist-vim".
GitHub Password for installero:

After entering my password I got Not Found message.

Same think here.

luizcorreia avatar Dec 02 '21 11:12 luizcorreia

I've solved by this:

  • go to Settings/Developer settings/Personal access tokens in your github profile and create one with only gists access
  • create ~/.gist-vim
  • paste into created file token <my newly created token> And auth on Gist commands just works.

mistical2008 avatar Dec 09 '21 06:12 mistical2008

I've solved by this:

  • go to Settings/Developer settings/Personal access tokens in your github profile and create one with only gists access
  • create ~/.gist-vim
  • paste into created file token <my newly created token> And auth on Gist commands just works.

This gives me a Post failed: error

EdwardKerckhof avatar Dec 10 '21 18:12 EdwardKerckhof

me too. I have Bad credentials error. The only way for me it is enter to vim, and then enter:

:let g:gist_token = 'ghp_xxxDSDJSLDKSLClsldadlasdajk'

hpsaturn avatar Dec 10 '21 23:12 hpsaturn

it should works with just put ~/.gist-vim. If you still have an issue, please generate new token again.

mattn avatar Dec 19 '21 12:12 mattn

But it is a new token, Github forced me to renew it. On other hand the token is valid, because Gist works fine but only when I put it in execution, when I put it in the hidden file it doesn't works. When I remove the hidden file, Gist doesn't start the authentication flow.

hpsaturn avatar Dec 19 '21 21:12 hpsaturn

Keyword token leading a line is missing?

mattn avatar Dec 19 '21 23:12 mattn