vim-gist
vim-gist copied to clipboard
gist-vim does not work with API keys
Hi there. I have two factor auth enabled and so cannot use my password for gist-vim auth.
Typically the solution is to use an API token, but putting in a token just results in "not found".
https://www.dropbox.com/s/arkg2nj4otrn7s0/Screenshot%202014-08-02%2015.42.24.png
Might be useful to implement. Thanks for the good work!
If you want to use two factor's auth, once rename ~/.gist-vim to ~/.gist-vim.old . And try :Gist -l
, then you will give SMS message with code.
I also have two-factor auth and can't get gist-vim to work.
I have tried the following with no success:
- manually creating a token and putting it in
~/.gist.vim
- trying to let
gist-vim
create a token for me by typing in my password and SMS authentication code.
When I type :Gist
from within Vim, I get a prompt: Github password for rianrainey:
. I type in my correct password, a SMS message appears on my phone, but Vim says 'Cancelled' in the status bar and I never get a chance to complete step 2 of the authentication.
What am I doing wrong?
Gist-vim can create ~/.gist
automanically for two-factor auth.
When github returns non-OTP header, Canceled
is displayed.
I had a related problem with two-factor auth - I had set the personal access token in ~/.gist-vim but was confused to find that gist-vim
seemed to not use it and continued to offer the OTP token error. I then noticed that the function s:GistGetAuthHeader returns before ~/.gist-vim is even read if a password is set in .gitconfig. Set g:gist_use_password_in_gitconfig = 0 to avoid the early return and allow the function to parse ~/.gist-vim for the personal service token in the case of two-factor auth.