Pkg generate error

I am trying to generate a package using Pkg generate.

Pkg>generate test

gave

ERROR: GitError(Code:ERROR, Class:SSL, 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 SSL_CERT_FILE 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.)

Can anyone explain what this error means and how to solve it?

I tried

julia>export JULIA_SSL_CA_ROOTS_PATH=""

at the julia prompt but got the error

ERROR: syntax: invalid assignment location "export JULIA_SSL_CA_ROOTS_PATH" around REPL[1]:1

(julia newbie, Pkg noob…:))

I tried

ENV["JULIA_SSL_CA_ROOTS_PATH"] = ""

instead of the export format suggested in the error and as tried above, and then it seemed to work. Still wondering what the error actually means and why the export syntax does not work.

I have no idea why specifically Pkg.generate would give a git error. Do other Pkg operations work without the workaround?

The export suggestion in the error message refers to “your environment” and rather means “your operating system environment”, i.e. outside of Julia. The export syntax is valid in Linux (and possibly Mac).

So, yes, the error message is far from helpful unless you happen to have the right background knowledge.

Maybe fixed by Don't error when initializing LibGit2 with CA roots path by visr · Pull Request #56924 · JuliaLang/julia · GitHub

At the very least the confusing error message is removed by that PR. :slight_smile: