Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent interactive prompts during git fetch
We set the shell into MONITOR mode to prevent password prompts (either SSH or pinentry) from hijacking the TTY. If the command is suspended we know it's trying something not nice. So we kill it. This seems a bit crazy, but at least it does not seem to affect performance (relatively). I also have found no other way to work around these issues. Although we already set: ``` export GIT_SSH_COMMAND="${GIT_SSH_COMMAND:-"ssh"} -o BatchMode=yes" ``` It is not sufficient. For example, when a SSH configuration entry contains the ProxyJump option it will usually invoke a new instance of ssh which does not obey the BatchMode option we specified. Pinentry is a whole nother beast and can't even be disabled (to my knowledge). I tried both zsh 4.3.17 and 5.0.2 to be sure it doesn't break easily... Fixes sindresorhus#366 and sindresorhus#373 (hopefully).
- Loading branch information