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 24.1 use-feature truststore needs a list of trusted-host #142

Closed
toaster-code opened this issue Jun 25, 2024 · 3 comments
Closed

pip 24.1 use-feature truststore needs a list of trusted-host #142

toaster-code opened this issue Jun 25, 2024 · 3 comments

Comments

@toaster-code
Copy link

toaster-code commented Jun 25, 2024

Hi,
I was using pip 24.0 with cert truststore. I recently upgraded pip to v24.1 and I now I am getting cert errors. If I use pip for something like installing numpy, I get this:

`

pip install numpy --use-feature=truststore --force-reinstall --no-cache-dir
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)'))': /simple/numpy/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)'))': /simple/numpy/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)'))': /simple/numpy/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)'))': /simple/numpy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)'))': /simple/numpy/
Could not fetch URL https://pypi.org/simple/numpy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/numpy/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)'))) - skipping
`

I have a self signed certificate from my company so it does blame my certificate in this version.

I managed to avoid this message by adding a trusted-host name in %userprofile%\AppData\Roaming\pip\pip.ini:

`

[global]
use-feature = truststore
trusted-host = pypi.python.org
               pypi.org
               files.pythonhosted.org

`

But, if I fallback pip to 24.0 everything works fine again, and there is no need to declared trusted hosts. Why is that? Is that a new feature?

@notatallshaw
Copy link

notatallshaw commented Jun 25, 2024

I believe this is a duplicate of pypa/pip#12779

@sethmlarson
Copy link
Owner

Agreed, thanks @notatallshaw. Closing this issue.

@toaster-code
Copy link
Author

Yes you are absolutely right. This is a pypi issue (I don't know why I thought it was an issue in truststore package). I am sorry for the trouble.
Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants