You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You should try using system trust stores when there is a custom certificate
43
-
chain configured for your system that pip isn't aware of. Typically, this
44
-
situation will manifest with an `SSLCertVerificationError` with the message
45
-
"certificate verify failed: unable to get local issuer certificate":
24
+
```
46
25
47
-
```{pip-cli}
48
-
$ pip install -U SomePackage
49
-
[...]
50
-
SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (\_ssl.c:997)'))) - skipping
26
+
```{note}
27
+
Versions of pip prior to v24.2 did not use system certificates by default.
28
+
To use system certificates with pip v22.2 or later, you must opt-in using the `--use-feature=truststore` CLI flag.
51
29
```
52
30
53
-
This error means that OpenSSL wasn't able to find a trust anchor to verify the
54
-
chain against. Using system trust stores instead of certifi will likely solve
55
-
this issue.
31
+
On Python 3.10 or later, by default
32
+
system certificates are used in addition to certifi to verify HTTPS connections.
33
+
This functionality is provided through the {pypi}`truststore` package.
56
34
57
35
If you encounter a TLS/SSL error when using the `truststore` feature you should
58
36
open an issue on the [truststore GitHub issue tracker] instead of pip's issue
59
37
tracker. The maintainers of truststore will help diagnose and fix the issue.
60
38
39
+
To opt-out of using system certificates you can pass the `--use-deprecated=legacy-certs`
40
+
flag to pip.
41
+
42
+
```{warning}
43
+
On Python 3.9 or earlier, only certifi is used to verify HTTPS connections as
44
+
`truststore` requires Python 3.10 or higher to function.
45
+
46
+
The system certificate store won't be used in this case, so some situations like proxies
47
+
with their own certificates may not work. Upgrading to at least Python 3.10 or later is
0 commit comments