hatch icon indicating copy to clipboard operation
hatch copied to clipboard

hatch python install CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate

Open fhennig42 opened this issue 1 year ago • 3 comments

I'm trying to use hatch for managing different python versions on my corporate Windows 10 laptop which uses some custom certificates (for the public internet and for internal stuff like artifactory as well). When using pip I needed to install the package pip_system_certs to tell pip that it should use the Windows certificate store for dealing with SSL certs. Is there a way to configure this in hatch too? Without such a configuration I get the following error:

hatch python install 3.12
... (very long stack trace)
ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)  

OS: Windows 10

Hatch version: Hatch, version 1.12.0

Install method: Hatch was installed using pip

Python (Host): Python 3.11.8 (installed from the corporate internal software self service store)

fhennig42 avatar Jul 15 '24 10:07 fhennig42

this is not possible currently, this is the code that downloads Python distributions https://github.com/pypa/hatch/blob/master/src/hatch/utils/network.py

ofek avatar Jul 15 '24 14:07 ofek

Hi @ofek , I am facing the same issue with required SSL bundle to connect to internet from my setup.

What environment variable should we use to specify the SSL bundle to be used in hatch python command? Thanks

Simon-Bru avatar Oct 15 '24 07:10 Simon-Bru

Hi @ofek , I am facing the same issue with required SSL bundle to connect to internet from my setup.

What environment variable should we use to specify the SSL bundle to be used in hatch python command? Thanks

Sorry I was in the wrong place I think ! Fixed by setting SSL_CERT_FILE environment variable. In case this help someone

Simon-Bru avatar Oct 15 '24 08:10 Simon-Bru