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
Copy file name to clipboardExpand all lines: stdlib/LibGit2/src/LibGit2.jl
+6-10Lines changed: 6 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1042,24 +1042,20 @@ function set_ssl_cert_locations(cert_loc)
1042
1042
else# files, /dev/null, non-existent paths, etc.
1043
1043
cert_file = cert_loc
1044
1044
end
1045
-
ret =@ccall libgit2.git_libgit2_opts(
1045
+
ret =@ccall libgit2.git_libgit2_opts(
1046
1046
Consts.SET_SSL_CERT_LOCATIONS::Cint;
1047
1047
cert_file::Cstring,
1048
1048
cert_dir::Cstring)::Cint
1049
1049
ret >=0&&return ret
1050
+
# On macOS and Windows LibGit2_jll is built without a TLS backend that supports
1051
+
# certificate locations; don't throw on this expected error so we allow certificate
1052
+
# location environment variables to be set for other purposes.
1053
+
# We still try doing so to support other LibGit2 builds.
1050
1054
err = Error.GitError(ret)
1051
1055
err.class == Error.SSL &&
1052
1056
err.msg =="TLS backend doesn't support certificate locations"||
1053
1057
throw(err)
1054
-
var =nothing
1055
-
for v in NetworkOptions.CA_ROOTS_VARS
1056
-
haskey(ENV, v) && (var = v)
1057
-
end
1058
-
@assert var !==nothing# otherwise we shouldn't be here
1059
-
msg ="""
1060
-
Your Julia is built with a SSL/TLS engine that libgit2 doesn't know how to configure to use a file or directory of certificate authority roots, but your environment specifies one via the $var variable. If you believe your system's root certificates are safe to use, you can `export JULIA_SSL_CA_ROOTS_PATH=""` in your environment to use those instead.
0 commit comments