pypa / hatch

Modern, extensible Python project management
https://hatch.pypa.io/latest/
MIT License
5.83k stars 288 forks source link

hatch python install CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate #1618

Open fhennig42 opened 1 month ago

fhennig42 commented 1 month ago

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)

ofek commented 1 month ago

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