Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip --no-input will still prompt for git and ssh #12718

Open
1 task done
cdleonard opened this issue May 21, 2024 · 1 comment · May be fixed by #13228
Open
1 task done

pip --no-input will still prompt for git and ssh #12718

cdleonard opened this issue May 21, 2024 · 1 comment · May be fixed by #13228
Labels
C: cli Command line interface related things (optparse, option grouping etc) type: bug A confirmed bug or unintended behavior

Comments

@cdleonard
Copy link

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 pypa/pipx#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

@cdleonard cdleonard added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels May 21, 2024
@ichard26
Copy link
Member

ichard26 commented Jul 6, 2024

PRs are welcome.

@ichard26 ichard26 added C: cli Command line interface related things (optparse, option grouping etc) and removed S: needs triage Issues/PRs that need to be triaged labels Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: cli Command line interface related things (optparse, option grouping etc) type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants