setuptools fails in corporate MITM proxy with intermediate SSL cacerts
See original GitHub issueI was looking at the following piece of code in package_index.py:
use_ssl = (
verify_ssl
and ssl_support.is_available
and (ca_bundle or ssl_support.find_ca_bundle())
)
if use_ssl:
self.opener = ssl_support.opener_for(ca_bundle)
I have added/appened the corporate CA certificates to /etc/ssl/cert.pem but setuptools never actually picks it up or uses it. Did anyone ever solve this?
FYI I am on a MacOS and using Anaconda with Python 3.6
Error that I get:
Download error on https://pypi.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833) -- Some packages may not be found!
No local packages or working download links found for textacy
error: Could not find suitable distribution for Requirement.parse('textacy')
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Certificates - mitmproxy docs
Quick Setup. By far the easiest way to install the mitmproxy CA certificate is to use the built-in certificate installation app. To do...
Read more >pip always fails ssl verification - Stack Overflow
Please ensure your firewall/proxy allows access to/from: pypi.org; files.pythonhosted.org. So you could give a try to something like: $ python - ...
Read more >HTTPS Certificates - pip documentation v22.3.1
This error means that OpenSSL wasn't able to find a trust anchor to verify the chain against. Using system trust stores instead of...
Read more >How to Man in the Middle HTTPS Using mitmproxy - Earthly Blog
We are trying to man in the middle our own requests. To help overcome this, mitmproxy has generated a certificate. All we need...
Read more >Installing SSL Security Certificates for Simplicity Studio Updates
Normally this is done by installing a company signed Root certificate onto ... If there is a man in the middle certificate then...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@eholic thanks worked like a charm! In my case to make it more “portable” I used
Note to others: I had to use full path
/home/<some_path>
and not relative path for home directory~
.Temporal solution of https://github.com/pypa/setuptools/issues/1543, https://github.com/pypa/setuptools/pull/1821 is overwriting cert_paths in
setup.py
.https://github.com/pypa/setuptools/blob/17ad2b72ed29c91fd32e939abf3625314fe7c4ed/setuptools/ssl_support.py#L21