lambdalisue / vim-gina

👣 Asynchronously control git repositories in Neovim/Vim 8
http://www.vim.org/scripts/script.php?script_id=5531
MIT License
688 stars 27 forks source link

Gina {command} hungs when the process requires a user input. #6

Closed lambdalisue closed 7 years ago

lambdalisue commented 7 years ago
  1. git clone https://github.com/lambdalisue/gina.vim
  2. Move into gina.vim
  3. nvim
  4. :Gina push
  5. Username for 'https://github.com': is shown and hung.
lambdalisue commented 7 years ago

Or with 'Vim 8

Messages maintainer: Bram Moolenaar <Bram@vim.org>
Fail: git --no-pager -c core.editor=false -C /home/alisue/wk/gina.vim push
fatal: could not read Username for 'https://github.com': No such device or address
lambdalisue commented 7 years ago

https://github.com/git/git/blob/35f6318d44379452d8d33e880d8df0267b4a0cd0/credential.c#L134 https://github.com/git/git/blob/35f6318d44379452d8d33e880d8df0267b4a0cd0/prompt.c#L44

lambdalisue commented 7 years ago

REQUESTING CREDENTIALS Without any credential helpers defined, Git will try the following strategies to ask the user for usernames and passwords:

    1. If the GIT_ASKPASS environment variable is set, the program
       specified by the variable is invoked. A suitable prompt is provided
       to the program on the command line, and the user’s input is read
       from its standard output.

    2. Otherwise, if the core.askPass configuration variable is set, its
       value is used as above.

    3. Otherwise, if the SSH_ASKPASS environment variable is set, its
       value is used as above.

    4. Otherwise, the user is prompted on the terminal.
lambdalisue commented 7 years ago

Should be fixed on Linux/Mac by https://github.com/lambdalisue/gina.vim/commit/6a660d587c8f4974c3b9fdbb370e067816a8bb44

Windows is not supported until someone write a correct askpass.window script.

lambdalisue commented 7 years ago

While the commit breaks a lot of things. The commit has reverted and a new PR has created to test.

lambdalisue commented 7 years ago

Closed by #11