lambdalisue / vim-gista

An alternative gist.vim, vim plugin which manipulate gists in Vim.
http://www.vim.org/scripts/script.php?script_id=4976
MIT License
156 stars 5 forks source link

Can't login #85

Open FatBoyXPC opened 5 years ago

FatBoyXPC commented 5 years ago

I've tried to :Gista login and it says Login into GitHub as FatBoyXPC but doesn't do anything else. I get no error messages or anything. I'm not sure how to proceed from here.

For now, I manually created the token file: https://github.com/lambdalisue/vim-gista/blob/master/doc/vim-gista.txt#L886

lambdalisue commented 5 years ago

Does :Gista list work?

FatBoyXPC commented 5 years ago

Yep! I had a few problems with the cache and such, but I'm hoping that's all cleared up.

lambdalisue commented 5 years ago

So solved? Please close the issue then πŸ‘

FatBoyXPC commented 5 years ago

Not really - when I run :Gista login I expect something to happen (a prompt, a web browser opening, etc) but nothing does.

lambdalisue commented 5 years ago

I see. Well, :Gista login just echo the username if you are already be logged in. So it seems you've already be logged in.

FatBoyXPC commented 5 years ago

Even when I wasn't logged in it wasn't opening anything up in a browser or prompting me, though.

lambdalisue commented 5 years ago

Even when I wasn't logged in

I'd like to make sure that so could you follow

  1. Remove ~/.cache/vim-gista/
  2. Restart your Vim
  3. Hit :Gista login

and it should show prompt like https://asciinema.org/a/cCeMPzC1AZwa8HqQ3kek3DSCG (I've enter wrong password twice so showed 401)

aiya000 commented 5 years ago

I don't understand the issue is same or not, but I have an imitated issue.

I did

$ rm -rf ~/.cache/vim-gista
$ vim foo

And

:Gista login
Please input a password of "aiya000" in "https://api.github.com":
<I input my correct password> 

This says

vim-gista: Authorization as "aiya000" in "https://api.github.com" has failed
422: Unprocessable Entity
Validation Failed

Here is my vim version (built by myself. not macVim. not using brew.) :point_down:

:version ``` VIM - Vi IMproved 8.1 (2018 May 18, compiled Aug 20 2019 10:34:41) macOS version Included patches: 1-1890 Compiled by aiya000 Huge version without GUI. Features included (+) or not (-): +acl ++builtin_terms +cmdline_info +diff -farsi -hangul_input +libcall +modify_fname -mouse_sysmouse +packages +python3/dyn -sound -tag_any_white +timers +visualextra -xfontset +arabic +byte_offset +comments +digraphs +file_in_path +iconv +linebreak +mouse +mouse_urxvt +path_extra +quickfix +spell -tcl +title +viminfo -xim +autocmd +channel +conceal -dnd +find_in_path +insert_expand +lispindent -mouseshape +mouse_xterm +perl +reltime +startuptime +termguicolors -toolbar +vreplace -xpm +autochdir +cindent +cryptv -ebcdic +float +job +listcmds +mouse_dec +multi_byte +persistent_undo +rightleft +statusline +terminal +user_commands +wildignore -xsmp -autoservername -clientserver +cscope +emacs_tags +folding +jumplist +localmap -mouse_gpm +multi_lang +postscript +ruby -sun_workshop +terminfo +vartabs +wildmenu -xterm_clipboard -balloon_eval +clipboard +cursorbind +eval -footer +keymap +lua -mouse_jsbterm -mzscheme +printer +scrollbind +syntax +termresponse +vertsplit +windows -xterm_save +balloon_eval_term +cmdline_compl +cursorshape +ex_extra +fork() +lambda +menu +mouse_netterm +netbeans_intg +profile +signs +tag_binary +textobjects +virtualedit +writebackup -browse +cmdline_hist +dialog_con +extra_search -gettext +langmap +mksession +mouse_sgr +num64 +python/dyn +smartindent -tag_old_static +textprop +visual -X11 system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" defaults file: "$VIMRUNTIME/defaults.vim" fall-back for $VIM: "/usr/local/share/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -L/usr/local/lib -o vim -lncurses -liconv -framework AppKit -pagezero_size 10000 -image_base 100000000 -L/usr/local/Cellar/luajit/2.0.5/lib -lluajit-5.1 -mmacosx-version-min=10.13 -fstack-protector-strong -L/usr/local/lib -L/usr/local/Cellar/perl/5.28.0/lib/perl5/5.28.0/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -lruby.2.5.3 -lobjc ```

My OS :point_down: γ‚Ήγ‚―γƒͺγƒΌγƒ³γ‚·γƒ§γƒƒγƒˆ 2019-10-18 15 51 02

PLease help me ><

lambdalisue commented 5 years ago

I've no idea 😒 . At least I could login in to my Github by using :Gista login right now (I'm using two factor authentication as well).

Not sure but what happen if you use neovim or Vim without +python/python3

FatBoyXPC commented 5 years ago

@aiya000 do you have 2FA setup? I do, and I'm wondering if maybe that was affecting things for me. I still need to remove my cached auth file and see what happens. I'll try to get to that this weekend.

aiya000 commented 5 years ago

Not sure but what happen if you use neovim or Vim without +python/python3

My :version is above :smile::point_up: It says +python/dyn +python3/dyn and the dynamic running seems working :D

At least I could login in to my Github by using :Gista login right now (I'm using two factor authentication as well). @aiya000 do you have 2FA setup? I do, and I'm wondering if maybe that was affecting things for me. I still need to remove my cached auth file and see what happens. I'll try to get to that this weekend.

I have not setup 2FA ! I'll try to setup 2FA too :D

aiya000 commented 5 years ago

NOTE: On my linux, :Gista is working well without 2FA πŸ’ͺ

aiya000 commented 5 years ago

I setup 2FA, then try :Gista post, also it is succeed!! Thanks!

adelin-b commented 3 years ago

Not it became impossible to login with password anymore due to github deprecating it

Login canceled by user
vim-gista: Authorization as "adelin-b" in "https://api.github.com" has failed
401: Unauthorized
Bad credentials. The API can't be accessed using username/password authentication. Please create a personal access token to access this endpoint: http://github.com/settings/tokens
aiya000 commented 3 years ago

I met an issue like this again x(

:Gista login
Please input a password of "aiya000" in "https://api.github.com": <input my access token here>

vim-gista: Authorization as "aiya000" in "https://api.github.com" has failed
0:
Not Found
Press ENTER or type command to continue

I couldn't determine this ocassion... But maybe, removing ~/.cache/vim-gista can occur this x(

ichizok commented 3 years ago

When I tried, https://api.github.com/authorizations returned "404 Not Found". 0: in the error message is caused by #88 .

lambdalisue commented 3 years ago

Thanks for the comments but please check https://github.com/lambdalisue/vim-gista/issues/89