RequestError: schannel: failed to open CA file 'C:\ProgramDatanaconda3_2024_10_1\Library\ssl': Unknown error 123 (0x0000007B

When I updated the Julia library, I encountered an error. However, it was working fine before. Has anyone encountered such a problem?

julia> versioninfo()
Julia Version 1.10.4
Commit 48d4fd4843 (2024-06-04 10:41 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 22 × Intel(R) Core(TM) Ultra 7 155H
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, goldmont)
Threads: 1 default, 0 interactive, 1 GC (on 22 virtual cores)
Environment:
  JULIA_PKG_SERVER = https://mirrors.pku.edu.cn/julia

(@v1.10) pkg> up
┌ Warning: could not download https://mirrors.pku.edu.cn/julia/registries
│   exception = RequestError: schannel: failed to open CA file 'C:\ProgramDatanaconda3_2024_10_1\Library\ssl': Unknown error 123 (0x0000007B) while requesting https://mirrors.pku.edu.cn/julia/registries
└ @ Pkg.Registry C:\Users\whkdi\AppData\Local\Programs\Julia-1.10.4\share\julia\stdlib\v1.10\Pkg\src\Registry\Registry.jl:69
    Updating registry at `C:\Users\whkdi\.julia\registries\General.toml`
┌ Warning: could not download https://mirrors.pku.edu.cn/julia/registries
│   exception = RequestError: schannel: failed to open CA file 'C:\ProgramDatanaconda3_2024_10_1\Library\ssl': Unknown error 123 (0x0000007B) while requesting https://mirrors.pku.edu.cn/julia/registries
└ @ Pkg.Registry C:\Users\whkdi\AppData\Local\Programs\Julia-1.10.4\share\julia\stdlib\v1.10\Pkg\src\Registry\Registry.jl:69
     Cloning [6fe1bfb0-de20-5000-8ca7-80f57d26f881] OffsetArrays from https://github.com/JuliaArrays/OffsetArrays.jl.git
ERROR: failed to clone from https://github.com/JuliaArrays/OffsetArrays.jl.git, 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.)

You should check the last error. The environment variable SSL_CERT_FILE is set to C:\ProgramDatanaconda3_2024_10_1\Library\ssl and it does not exist or may be corrupted because it should have been like C:\ProgramData\anaconda3_2024_10_1\Library\ssl. You can either delete or correct this environment variable or also you may set JULIA_SSL_CA_ROOTS_PATH environment variable to the appropriate path for julia.

You are running Julia from an activated Conda environment which points to the CA file. Indeed you could set JULIA_SSL_CA_ROOTS_PATH to the empty string as suggested in the error message.

But if you can update to the latest LTS patch release, 1.10.10, you don’t get this error due to Don’t error when initializing LibGit2 with CA roots path by visr · Pull Request #56924 · JuliaLang/julia. You’ll still get warnings until 1.12 is released though with Search SSL_CERT_FILE before SSL_CERT_DIR by visr · Pull Request #37 · JuliaLang/NetworkOptions.jl.

Thanks. export JULIA_SSL_CA_ROOTS_PATH="" works.