mattn/vim-gist

Can't setup with 2fa (instead, g:gist_token allow me to complete setup :))

aiya000 opened this issue ยท 16 comments

My Vim said below after I installed vim-gist then did :Gist.

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 aiya000: <input here with my an access token>
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".
Not Found

I'm using 2fa.
Maybe, it is factor of this.

Instead, my setup is completed with setting g:gist_token ๐ŸŽ‰


First, I reported, but alright, I don't want to hurry up to resolve this issue :3

Just I reported for the way to complete setup :)

Thanks!

Thank you, this resolved my issue. Great plugin otherwise.

Additional info: I am not using 2FA in Github, but I did have to pass it the token manually. It would not accept my password, and gave me "Not Found"

Same for me

mattn commented

First authentication of 2FA is deprecated on GitHub. You need to set below into your ~/.gist-vim

token XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Thanks, that worked for me

I am not using 2fa,and also had set 'toekn xxxxxxxxxxxx' in ~/.gist-vim.but it still gave me "post faild..."

mattn commented

token not toekn.

mattn commented

please check permissions of the token.

jarun commented

I have 2FA set and I had to add the following in ~/.gist-vim:

user jarun    
token XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I did a fresh install with Vundle and nothing, the same problem:

  • Gist never ask me for my credentials or run any process for authentication
  • Never Gist stored nothing in .gist-vim

The provisional only solution:

  1. run Vim
  2. let g:gist_token = 'ghp_mDsdadxxxxxxxxxxxxxxxxxxxxxxx'
  3. Gist -l
mattn commented

No. You NEED to store token XXXXXX manually into your .gist-vim

mattn commented

@jarun Do not add user line.

mattn commented

I close this issue since most of problems you met are simply mistaking to setup .gist-vim

No. You NEED to store token XXXXXX manually into your .gist-vim

sorry, but manually it doesn't works too. I tried everything, the only thing that works is this that I mentioned.

mattn commented

Did you check that the token has Gist privileges correctly?

well, the token only have one permission in the Github token settings, gist, and with it works fine but only when I doing manually like this:

let g:gist_token = 'ghp_mDsdadxxxxxxxxxxxxxxxxxxxxxxx'

and the permissions of .gist-vim on my home directory is 644, I need more?