-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't error when initializing LibGit2 with CA roots path #56924
base: master
Are you sure you want to change the base?
Conversation
8be0eee
to
e33618a
Compare
Test failures are unrelated. I rebased this now on top of the LibGit2 1.9 update and switch to OpenSSL that have merged since. Would appreciate a review on this and its companion JuliaLang/NetworkOptions.jl#37. Tagging @StefanKarpinski who originally contributed this code in #38827. |
Bump, hoping to get a review for this and JuliaLang/NetworkOptions.jl#37. |
I don't think I have the necessary knowledge to review this PR, but I can try to find someone to review it. |
Thanks for the review of JuliaLang/NetworkOptions.jl#37 @aviks. Would you be able to take a look at this one as well? |
When e.g. SSL_CERT_FILE is set, we cannot set this location in LibGit2_jll because it isn't built with support for that. Until now we've errored out with a message telling users to set JULIA_SSL_CA_ROOTS_PATH to an empty string. This changes the behavior to allow this expected error. Variables like SSL_CERT_FILE are for instance set by Conda, ensuring many people running into this, see e.g. https://discourse.julialang.org/search?q=JULIA_SSL_CA_ROOTS_PATH. The other part, and some more context for this, is here: JuliaLang/NetworkOptions.jl#37 (comment)
e33618a
to
16739c2
Compare
Rebased and rewrote the top post with a lot of references for easier reviewing. |
When SSL_CERT_FILE or SSL_CERT_DIR is set, it is impossible to set this location in LibGit2_jll on Apple and Windows because it isn't built with support for that. 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. 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 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.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.