Strange Error at Installing Packages `git` failed to clone

Thanks for the reply!

I think they were not, but correct me if I am wrong, but I ran this before adding all the packages

(@v1.6) pkg> status
      Status `C:\Users\XXX\.julia\environments\v1.6\Project.toml` (empty project)

Still I might be wrong. I do not understand pretty well these issues. Certainly, any help works because I have a whole project written in Julia and this issue with the packages has not allowed me to run my code for a week, so I am very worried. I edited the post above with the code I get when I run the ones that work.

By the way, the same error happens with Conda


(@v1.6) pkg> add Conda
    Updating registry at `C:\Users\alfaroua\.julia\registries\General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Resolving package versions...
     Cloning [69de0a69-1ddd-5017-9359-2bf0b02dc9f0] Parsers from https://github.com/JuliaData/Parsers.jl.git
   Installed Parsers ──────── v1.1.0
     Cloning [8f4d0f93-b110-5947-807f-2305c1781a2d] Conda from https://github.com/JuliaPy/Conda.jl.git
   Installed Conda ────────── v1.5.2
     Cloning [682c06a0-de6a-54ab-a142-c8b1cf79cde6] JSON from https://github.com/JuliaIO/JSON.jl.git
   Installed JSON ─────────── v0.21.1
     Cloning [81def892-9a0e-5fdd-b105-ffc91e053289] VersionParsing from https://github.com/JuliaInterop/VersionParsing.jl.git
ERROR: failed to clone from https://github.com/JuliaInterop/VersionParsing.jl.git, error: GitError(Code:ERROR, Class:OS, failed to read data: El servidor devolvió una respuesta no válida o no reconocida
)


@lmiq

Well, most of them (if not all) are Base. You can for instance run using Iterators without adding it.

In a command line, run git --version. What’s the output?

I don’t know if that has anything to do with that, but a weird package problem I had once was solved with this:

Those packages are so called stdlibs, packages which are included with Julia and don’t require a download.

I agree that there’s little obvious system to that. Are you behind a firewall that can interfere with your network traffic? Do you have antivirus software that may overreact to certain files? Does git cloning of the difficult packages work outside of Julia? E.g.

git clone https://github.com/JuliaPackaging/Preferences.jl.git

This looks unrelated since it’s git cloning that fails. Here I would rather suggest trying with the package servers, but since that’s the default and has apparently been disabled I assume that has already been tried.

1 Like

Thanks so much @GunnarFarneback . Yes, I think that this might be related to the firewall or some proxy settings. What is weird is that I can enter to https://github.com/JuliaPackaging/Preferences.jl.git or to https://github.com/JuliaInterop/VersionParsing.jl.git through the browser, however, it does not work to download the packages through Julia.

I will try to clone things through the shell to see what I get. However, can you think of any other diagnostic or fix?

1 Like
C:\Users\XXX>git --version
"git" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.

I get this output. It basically says in Spanisg something like git is not recognized as an internal or external command, program or file

Git cloning packages does not work in the cmd for example. Weird


$ git clone https://github.com/JuliaPackaging/Preferences.jl.git
Cloning into 'Preferences.jl'...
fatal: unable to access 'https://github.com/JuliaPackaging/Preferences.jl.git/': SSL certificate problem: self signed certificate in certificate chain

I’m not sure how Julia works with this, I never used Julia on a computer where I hadn’t already installed git, but it might be a good idea to google how to install git on Windows and do so. Can’t swear it will help though.

In Git I get the following

XXX@XXX MINGW64 ~
$ git --version
git version 2.32.0.windows.1

XXX@XXX MINGW64 ~
$ git clone https://github.com/Juliapackagin/Preferences.jl.git
Cloning into 'Preferences.jl'...
fatal: unable to access 'https://github.com/Juliapackagin/Preferences.jl.git/': SSL certificate problem: self signed certificate in certificate chain

Might be an antivirus problem, apparently

@GunnarFarneback

I have no experience of SSL failures so can’t really help more than point to GitHub - JuliaLang/NetworkOptions.jl, which mentions a bit of SSL.

I solved the Git issue with the SSL certificates, for example now this works,

XXX@XXX MINGW64 ~
$ git clone https://github.com/JuliaPackaging/Preferences.jl.git
Cloning into 'Preferences.jl'...
remote: Enumerating objects: 91, done.
remote: Counting objects: 100% (91/91), done.
remote: Compressing objects: 100% (62/62), done.
remote: Total 91 (delta 27), reused 72 (delta 21), pack-reused 0
Receiving objects: 100% (91/91), 29.99 KiB | 438.00 KiB/s, done.
Resolving deltas: 100% (27/27), done

I can clone Distributions using the bash as well. However, I still get errors when adding packages to Julia, for example with Distributions:

(@v1.6) pkg> add "https://github.com/JuliaStats/Distributions.jl"
     Cloning git-repo `https://github.com/JuliaStats/Distributions.jl`
    Updating git-repo `https://github.com/JuliaStats/Distributions.jl`
    Updating registry at `C:\Users\alfaroua\.julia\registries\General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Resolving package versions...
     Cloning [1a297f60-69ca-5386-bcde-b61e274b549b] FillArrays from https://github.com/JuliaArrays/FillArrays.jl.git
   Installed FillArrays ───── v0.11.7
     Cloning [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] JLLWrappers from https://github.com/JuliaPackaging/JLLWrappers.jl.git
ERROR: failed to clone from https://github.com/JuliaPackaging/JLLWrappers.jl.git, error: GitError(Code:ERROR, Class:OS, failed to read data: El servidor devolvió una respuesta no válida o no reconocida
)

try using the bundled SSL?

1 Like

Thanks so much for the suggestion.

I tried to do this by following the steps on @StefanKarpinski post and got the following error


julia>

(@v1.6) pkg>  add "https://github.com/JuliaPackaging/JLLWrappers.jl"
     Cloning git-repo `https://github.com/JuliaPackaging/JLLWrappers.jl`
ERROR: failed to clone from https://github.com/JuliaPackaging/JLLWrappers.jl, 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 JULIA_SSL_CA_ROOTS_PATH 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.)

(@v1.6) pkg>

You have two options:

  1. Add your firewall’s certificate to the Windows system root cert store (and don’t try to use a PEM file, since libgit2 can’t do that)

  2. Tell Julia not to verify GitHub.com by setting the appropriate options via environment variable documented in NetworkOptions.jl

1 Like

Hi thanks so much!

Can you please elaborate on the second option? What is the exact command I should write?

I am sorry, but I am having such a hard time understanding this error.