Reputation: 806
I have a pypi server, TLS server cert signed by self signed CA.
I added it as a source (default, secondary = false) to my toml
file using
poetry source add mypypiserver https://server.url/
I added the CA cert using
poetry config certificates.mypypiserver.cert /path/to/ca.crt
When attempting to add external packages from pypi, such as matplotlib
, even if I specify the source as pypi, I get an SSLError
.
poetry add --source pypi matplotlib
Verbose logging tells me it tries to access /python-dateutil/
which results in a 303
redirect to https://pypi.org/simple/python-dateutil/
.
Errors:
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)
HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/python-dateutil/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)')))
I suspect this is because the certificate of pypi.org
does not match the self signed CA certificate.
How can this be resolved?
Upvotes: 2
Views: 361