pip --no-input will still prompt for git and ssh
Description
pip --no-input is a documented option to "Disable prompting for input.". However prompts coming from git and ssh are still shown.
This is particularly bad for https://github.com/pypa/pipx/issues/1418 because pipx runs with --no-input and hidden stdout which means it can hang indefinitely on authentication showing just a spinner.
Expected behavior
pip --no-input should fail if git or ssh authentication is missing.
The ssh prompt could be suppressed by setting GIT_SSH_COMMAND='ssh -oBatchMode=yes' and GIT_TERMINAL_PROMPT=0 in the environment, but this might not be a complete solution for all possible prompts.
pip version
24.0
Python version
3.10.12
OS
Ubuntu 22.04.04 LTS
How to Reproduce
Run a command like this:
pip install -q --no-input 'xxx@git+ssh://yyy@$SOME_HOST/xxx.yyy'
Where $SOME_HOST is a host that runs ssh. This will prompt for the password for the yyy user despite --no-input
Output
No response
Code of Conduct
- [X] I agree to follow the PSF Code of Conduct.