Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth via ~/.gist-vim not working #233

Open
mklopets opened this issue Aug 16, 2021 · 9 comments
Open

Auth via ~/.gist-vim not working #233

mklopets opened this issue Aug 16, 2021 · 9 comments

Comments

@mklopets
Copy link

mklopets commented Aug 16, 2021

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.

@hpsaturn
Copy link

hpsaturn commented Oct 4, 2021

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

@installero
Copy link

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.

@luizcorreia
Copy link

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.

@mistical2008
Copy link

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.

@EdwardKerckhof
Copy link

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

@hpsaturn
Copy link

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'

@mattn
Copy link
Owner

mattn commented Dec 19, 2021

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

@hpsaturn
Copy link

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.

@mattn
Copy link
Owner

mattn commented Dec 19, 2021

Keyword token leading a line is missing?

@pinggit pinggit mentioned this issue Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants