mattn / vim-gist

Vim plugin for Gist
http://www.vim.org/scripts/script.php?script_id=2423
1.69k stars 131 forks source link

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

Closed aiya000 closed 2 years ago

aiya000 commented 3 years ago

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 :tada:


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!

weetabix commented 3 years ago

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

weetabix commented 3 years ago

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"

matthutchinson commented 3 years ago

Same for me

mattn commented 3 years ago

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

token XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
matthutchinson commented 3 years ago

Thanks, that worked for me

chana1024 commented 3 years ago

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

mattn commented 3 years ago

token not toekn.

mattn commented 3 years ago

please check permissions of the token.

jarun commented 3 years ago

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

user jarun    
token XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
hpsaturn commented 2 years ago

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

The provisional only solution:

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

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

mattn commented 2 years ago

@jarun Do not add user line.

mattn commented 2 years ago

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

hpsaturn commented 2 years ago

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 2 years ago

Did you check that the token has Gist privileges correctly?

hpsaturn commented 2 years ago

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?