Commit ed6097f
Don't error when initializing LibGit2 with CA roots path (#56924)
When SSL_CERT_FILE or SSL_CERT_DIR is set, it is [impossible to set this
location](https://github.com/libgit2/libgit2/blob/4dcdb64c6844d76776745cdc25071a72c1af84d6/src/libgit2/settings.c#L206-L222)
in LibGit2_jll on Apple and Windows because [it isn't built with support
for
that](https://github.com/JuliaPackaging/Yggdrasil/blob/7123a60a68102ba6cd953e13a4e45845dc37fd82/L/LibGit2/build_tarballs.jl#L67).
Until now we've errored out with a message telling users to set
JULIA_SSL_CA_ROOTS_PATH to an empty string, which is a somewhat
problematic workaround because the Windows environment variables UI
doesn't allow empty values, and [setting it to an empty string from
PowerShell unsets
it](https://discourse.julialang.org/t/how-to-fix-ssl-cert-issues-in-pkg/115495/7?u=visr).
This PR changes the behavior to allow this expected error.
Variables like SSL_CERT_FILE are for instance [set by the Conda OpenSSL
package on environment
activation](https://github.com/conda-forge/openssl-feedstock/blob/83b5e2a793bc95d19e6cc2d9d28068f1a6ff6b79/recipe/activate-win.ps1)
used by e.g. Python, ensuring many people cannot use Pkg operations that
use LibGit2, like `dev Example`, `add Example#master`. See more user
reports [on
Discourse](https://discourse.julialang.org/search?q=JULIA_SSL_CA_ROOTS_PATH).
Together with JuliaLang/NetworkOptions.jl#37
this should improve the experience of users trying out Julia from a
Conda environment. This should also be fine to backport.
(cherry picked from commit 7fa969a)1 parent b634fff commit ed6097f
2 files changed
+21
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1005 | 1005 | | |
1006 | 1006 | | |
1007 | 1007 | | |
1008 | | - | |
| 1008 | + | |
1009 | 1009 | | |
1010 | 1010 | | |
1011 | 1011 | | |
1012 | 1012 | | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
1013 | 1017 | | |
1014 | 1018 | | |
1015 | 1019 | | |
1016 | 1020 | | |
1017 | | - | |
1018 | | - | |
1019 | | - | |
1020 | | - | |
1021 | | - | |
1022 | | - | |
1023 | | - | |
1024 | | - | |
1025 | | - | |
| 1021 | + | |
1026 | 1022 | | |
1027 | 1023 | | |
1028 | 1024 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
20 | 26 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | | - | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| |||
0 commit comments