Adding package failure due to invalid SSL certificate

LibGit2 seems to ignore the configuration with

git config http.sslVerify false

and other sources.

Here

it is suggested to set an environment variable:

export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt

But I think the way to go is using a callback as described here:
https://docs.julialang.org/en/v1/stdlib/LibGit2/#LibGit2.ProxyOptions

Searching and try and error with Copy&Paste lead me to:

julia> using LibGit2

julia> function certNoCheck() return 0; end
certNoCheck (generic function with 1 method)

julia> const cb = @cfunction(certNoCheck,Cint,())
Ptr{Nothing} @0x000000002eee4c10

julia> LibGit2.ProxyOptions(certificate_cb=cb)
LibGit2.ProxyOptions(0x00000001, LibGit2.Consts.PROXY_AUTO, Cstring(0x0000000000000000), Ptr{Nothing} @0x0000000000000000, Ptr{Nothing} @0x000000002eee4c10, Ptr{Nothing} @0x0000000000000000)

But I have no idea if this is working at all nor if it provides the “no cert validation” for the package managers use of LibGit2.

I think if this doesn’t work, I am out of options and someone else must fill in. You may consider pinging Stefan Karpinski (Author of Pkg3). @(delete space to ping)StefanKarpinski

1 Like