Pkg.update() fails after upgrading to v1.3

I just upgraded Julia to v1.3 and Pkg.update() fails with the following message. It was working fine with v1.2. I tried deleting ~/.julia but it didn’t work. Please help.

julia> Pkg.update()
Cloning default registries into ~/.julia
Cloning registry from “https://github.com/JuliaRegistries/General.git
ERROR: Git repository not found at ‘https://github.com/JuliaRegistries/General.git
Stacktrace:
[1] pkgerror(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Types.jl:113
[2] #clone#4(::String, ::Base.Iterators.Pairs{Symbol,LibGit2.CachedCredentials,Tuple{Symbol},NamedTuple{(:credentials,),Tuple{LibGit2.CachedCredentials}}}, ::typeof(Pkg.GitTools.clone), ::String, ::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/GitTools.jl:129
[3] #clone at ./none:0 [inlined]
[4] (::Pkg.Types.var"#124#126"{Pkg.Types.RegistrySpec,String})(::LibGit2.CachedCredentials) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Types.jl:1029
[5] shred!(::Pkg.Types.var"#124#126"{Pkg.Types.RegistrySpec,String}, ::LibGit2.CachedCredentials) at ./secretbuffer.jl:184
[6] clone_or_cp_registries(::Pkg.Types.Context, ::Array{Pkg.Types.RegistrySpec,1}, ::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Types.jl:1028
[7] clone_or_cp_registries at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Types.jl:1013 [inlined] (repeats 2 times)
[8] clone_default_registries() at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Types.jl:963
[9] #up#43(::Pkg.Types.UpgradeLevel, ::Pkg.Types.PackageMode, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Pkg.API.up), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:152
[10] up at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:146 [inlined]
[11] #up#42 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:141 [inlined]
[12] up at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:141 [inlined]
[13] #up#39 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:138 [inlined]
[14] up() at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:138
[15] top-level scope at REPL[3]:1
caused by [exception 1]
GitError(Code:EINVALIDSPEC, Class:Net, invalid url, missing path)
Stacktrace:
[1] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/LibGit2/src/error.jl:101 [inlined]
[2] clone(::String, ::String, ::LibGit2.CloneOptions) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/LibGit2/src/repository.jl:459
[3] #clone#131(::String, ::Bool, ::Ptr{Nothing}, ::LibGit2.CachedCredentials, ::Dict{Symbol,Tuple{Ptr{Nothing},Any}}, ::typeof(LibGit2.clone), ::String, ::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/LibGit2/src/LibGit2.jl:580
[4] #clone at ./none:0 [inlined]
[5] #clone#4(::String, ::Base.Iterators.Pairs{Symbol,LibGit2.CachedCredentials,Tuple{Symbol},NamedTuple{(:credentials,),Tuple{LibGit2.CachedCredentials}}}, ::typeof(Pkg.GitTools.clone), ::String, ::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/GitTools.jl:123
[6] #clone at ./none:0 [inlined]
[7] (::Pkg.Types.var"#124#126"{Pkg.Types.RegistrySpec,String})(::LibGit2.CachedCredentials) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Types.jl:1029
[8] shred!(::Pkg.Types.var"#124#126"{Pkg.Types.RegistrySpec,String}, ::LibGit2.CachedCredentials) at ./secretbuffer.jl:184
[9] clone_or_cp_registries(::Pkg.Types.Context, ::Array{Pkg.Types.RegistrySpec,1}, ::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Types.jl:1028
[10] clone_or_cp_registries at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Types.jl:1013 [inlined] (repeats 2 times)
[11] clone_default_registries() at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Types.jl:963
[12] #up#43(::Pkg.Types.UpgradeLevel, ::Pkg.Types.PackageMode, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Pkg.API.up), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:152
[13] up at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:146 [inlined]
[14] #up#42 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:141 [inlined]
[15] up at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:141 [inlined]
[16] #up#39 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:138 [inlined]
[17] up() at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:138
[18] top-level scope at REPL[3]:1

This actually looks like a network connection issue, it looks like it was not able to clone the general registry for whatever reason. Just for the hell of it, could you try doing exactly the same thing again (rarely these things happen for no apparent reason)? Can you ping github.com?

1 Like

I can clone https://github.com/JuliaRegistries/General.git without any problem. And v1.2 also works fine. Is v1.3 using a different way to connect to github?

That’s very, very strange. Julia uses libgit2 for interaction with git and I’m pretty sure there was an update to the version being used in Julia 1.3, but I don’t understand how it’s possible that only that seems to be blocked. If you have nmap (can probably install via your package manager) can you do nmap github.com? You should see ports 22, 443 and 9418 all open. If one of those is blocked, it could be indicative of the problem. Are you behind a firewall or anything like that?

I can’t nmap or ping since I am behind my company’s proxy. I have env variables http_proxy and https_proxy set and I can clone that repo manually. I don’t have any extra settings in my .gitconfig and ~/.ssh/config. Is there anything else that I can check?

It seems highly likely to me that this is has something to do with your company’s proxy. It’s strange that this seems to be happening only in 1.3, but as nobody else has reported this problem the issue is likely not on the Julia side. My guess would be that they are giving you access to port 443 on github.com but perhaps not 22 or 9418. A good next step would be to ask your IT department whether something is being blocked and for them to help you resolve the issue. It might be hard to determine what’s going on if you can’t even use nmap or ping.

LibGit2 was updated on 1.3 and there have been some issues with it: https://github.com/JuliaLang/julia/issues/33111.

1 Like

It might also be worth checking if

git clone git://github.com/JuliaRegistries/General.git

works.

I just followed the suggestion in https://github.com/JuliaLang/julia/issues/33111 by adding / to the end of http_proxy and https_proxy. And now it works. This is hilarious… Someone is being sloppy handling the strings.

3 Likes