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

--quiet suppresses ssl errors #4919

Closed
jsha opened this issue Dec 14, 2017 · 4 comments
Closed

--quiet suppresses ssl errors #4919

jsha opened this issue Dec 14, 2017 · 4 comments
Labels
auto-locked Outdated issues that have been locked by automation state: needs discussion This needs some more discussion type: enhancement Improvements to functionality

Comments

@jsha
Copy link

jsha commented Dec 14, 2017

  • Pip version: 9.0.01
  • Python version: 2.7.12
  • Operating system: Ubuntu 16.04.3 LTC

Description:

I was trying to figure out why pip install -q <packages> was failing. There was error message output but it did not make sense. When I removed -q, I saw that it was hiding an important SSL error.

What I've run:

Note: I'm aware that overriding REQUESTS_CA_BUNDLE caused the ssl error. My issue here is that the ssl error was hidden by -q, making it harder to diagnose the problem. In the actual use case, the setting of REQUESTS_CA_BUNDLE was far away, so the issue was not as obvious as it is in this toy example. :-)

$ REQUESTS_CA_BUNDLE=pebble.minica.pem pip install -q josepy
  Could not find a version that satisfies the requirement josepy (from versions: )
No matching distribution found for josepy
$ REQUESTS_CA_BUNDLE=pebble.minica.pem pip install josepy
Collecting josepy
  Could not fetch URL https://pypi.python.org/simple/josepy/: There was a problem confirming the ssl certificate: unknown error (_ssl.c:2831) - skipping
  Could not find a version that satisfies the requirement josepy (from versions: )
No matching distribution found for josepy
@pradyunsg pradyunsg added state: needs discussion This needs some more discussion type: enhancement Improvements to functionality labels Dec 16, 2017
@pradyunsg
Copy link
Member

Hi @jsha!

I like what you're suggesting. It should be a trivial change but I think it'd be nice to have someone else also pitch in to say this is a useful way to fix it. And also, I'd like to know what other @pypa/pip-committers think.

@bmw
Copy link

bmw commented Dec 19, 2017

I agree that this would be useful. Especially in the case when this error is fatal, it'd be nice for pip to show the real root cause of the error rather than a generic message about being unable to find a satisfying package. Being a security error like this though, always logging it at a higher logging level seems reasonable to me.

@chrahunt
Copy link
Member

chrahunt commented Sep 1, 2019

IMO --quiet should be quiet, with few/no exceptions. For post-mortem if needed one could always use --log <file> alongside --quiet.

Showing the "real" cause of an error becomes more difficult when considering that multiple index servers may be configured and may sometimes be inaccessible in normal usage. This also becomes less of an issue if following the advice above and the logs are available.

@chrahunt
Copy link
Member

I hope the above advice helps! It has been some time without any action on this issue, so I will close it.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jan 11, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation state: needs discussion This needs some more discussion type: enhancement Improvements to functionality
Projects
None yet
Development

No branches or pull requests

4 participants