Problems fetching "Registry General" package from github

Hello,
I am totally new to the language, the Juno editor and the Atom environment. Good start, boy! :smile:
The REPL in Atom/Juno fails to install packages from the first time it is started.
In particular I get an error message at a very early step, about 33% of the fetching done.
I tried as well to install the Atom package in the Julia REPL itself (no Atom or Juno environment) using the following commands:
using Pkg
Pkg.add(“Atom”)
and it fails in exactly the same way.
I tried as well:
Pkg.Registry.add(“General”)
In all three cases I get exactly the same error:
Cloning registry from “https://github.com/JuliaRegistries/General.git
ERROR: failed to clone from https://github.com/JuliaRegistries/General.git, error: GitError(Code:ERROR, Class:OS, failed to read data: The server returned an invalid or unrecognized response

I found similar problems reported elsewhere, but none looked exactly like this one, with a fetching process consistently aborted midway and for a package that looks quite basic, considering the full Atom one.

Any ideas?

Note: Julia version is 1.6.0, Juno (uber-juno) version is 0.3.0, Atom version is 1.55.0

1 Like

Hi, it would be helpful if you could quote program input and output and post quoted test rather than screenshots.

Hi Stephan (@StefanKarpinski),
there is no much program input as I am just trying to add the Atom package from a fresh REPL session:
using Pkg
Pkg.add(“Atom”)

and the output from REPL is:

Installing known registries into C:\Users\jquir\.julia
Cloning registry from “https://github.com/JuliaRegistries/General.git
ERROR: failed to clone from https://github.com/JuliaRegistries/General.git, error: GitError(Code:ERROR, Class:OS, failed to read data: The connection with the server was terminated abnormally
)
Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:55
[2] clone(ctx::Pkg.Types.Context, url::String, source_path::String; header::String, credentials::Nothing, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.GitTools C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\GitTools.jl:119
[3] (::Pkg.Types.var"#81#84"{Pkg.Types.Context, String, Pkg.Types.RegistrySpec})(tmp::String)
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:1027
[4] mktempdir(fn::Pkg.Types.var"#81#84"{Pkg.Types.Context, String, Pkg.Types.RegistrySpec}, parent::String; prefix::String)
@ Base.Filesystem .\file.jl:729
[5] mktempdir (repeats 2 times)
@ .\file.jl:727 [inlined]
[6] clone_or_cp_registries(ctx::Pkg.Types.Context, regs::Vector{Pkg.Types.RegistrySpec}, depot::String)
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:1006
[7] clone_or_cp_registries
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:999 [inlined]
[8] clone_default_registries(ctx::Pkg.Types.Context; only_if_empty::Bool)
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:899
[9] clone_default_registries
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:887 [inlined]
[10] find_registered!(ctx::Pkg.Types.Context, names::Vector{String}, uuids::Vector{Base.UUID})
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:1270
[11] registry_resolve!(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec})
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:793
[12] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:184
[13] add
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:148 [inlined]
[14] add(pkgs::Vector{Pkg.Types.PackageSpec}; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:73
[15] add
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:72 [inlined]
[16] #add#21
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:70 [inlined]
[17] add
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:70 [inlined]
[18] #add#20
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:69 [inlined]
[19] add(pkg::String)
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:69
[20] top-level scope
@ REPL[2]:1
caused by: GitError(Code:ERROR, Class:OS, failed to read data: The connection with the server was terminated abnormally
)

Stacktrace:
[1] macro expansion
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\LibGit2\src\error.jl:110 [inlined]
[2] clone(repo_url::SubString{String}, repo_path::String, clone_opts::LibGit2.CloneOptions)
@ LibGit2 C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\LibGit2\src\repository.jl:459
[3] clone(repo_url::SubString{String}, repo_path::String; branch::String, isbare::Bool, remote_cb::Ptr{Nothing}, credentials::LibGit2.CachedCredentials, callbacks::Dict{Symbol, Tuple{Ptr{Nothing}, Any}})
@ LibGit2 C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\LibGit2\src\LibGit2.jl:583
[4] clone(ctx::Pkg.Types.Context, url::String, source_path::String; header::String, credentials::Nothing, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.GitTools C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\GitTools.jl:109
[5] (::Pkg.Types.var"#81#84"{Pkg.Types.Context, String, Pkg.Types.RegistrySpec})(tmp::String)
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:1027
[6] mktempdir(fn::Pkg.Types.var"#81#84"{Pkg.Types.Context, String, Pkg.Types.RegistrySpec}, parent::String; prefix::String)
@ Base.Filesystem .\file.jl:729
[7] mktempdir (repeats 2 times)
@ .\file.jl:727 [inlined]
[8] clone_or_cp_registries(ctx::Pkg.Types.Context, regs::Vector{Pkg.Types.RegistrySpec}, depot::String)
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:1006
[9] clone_or_cp_registries
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:999 [inlined]
[10] clone_default_registries(ctx::Pkg.Types.Context; only_if_empty::Bool)
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:899
[11] clone_default_registries
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:887 [inlined]
[12] find_registered!(ctx::Pkg.Types.Context, names::Vector{String}, uuids::Vector{Base.UUID})
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:1270
[13] registry_resolve!(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec})
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:793
[14] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:184
[15] add
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:148 [inlined]
[16] add(pkgs::Vector{Pkg.Types.PackageSpec}; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:73
[17] add
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:72 [inlined]
[18] #add#21
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:70 [inlined]
[19] add
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:70 [inlined]
[20] #add#20
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:69 [inlined]
[21] add(pkg::String)
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:69
[22] top-level scope
@ REPL[2]:1

I have this exact same problem!
Fresh PC, fresh Julia 1.6.1 installation

Activating new environment at C:\Users\eexsl40\Desktop\Code\Project.toml
Installing known registries into C:\Users\eexsl40\.julia
Cloning registry from “https://github.com/JuliaRegistries/General.git
ERROR: LoadError: failed to clone from https://github.com/JuliaRegistries/General.git, error: GitError(Code:ERROR, Class:OS, failed to read data: The server returned an invalid or unrecognized response
)
Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:55
[2] clone(ctx::Pkg.Types.Context, url::String, source_path::String; header::String, credentials::Nothing, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.GitTools C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\GitTools.jl:119
[3] (::Pkg.Types.var"#81#84"{Pkg.Types.Context, String, Pkg.Types.RegistrySpec})(tmp::String)
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:1031
[4] mktempdir(fn::Pkg.Types.var"#81#84"{Pkg.Types.Context, String, Pkg.Types.RegistrySpec}, parent::String; prefix::String)
@ Base.Filesystem .\file.jl:729
[5] mktempdir (repeats 2 times)
@ .\file.jl:727 [inlined]
[6] clone_or_cp_registries(ctx::Pkg.Types.Context, regs::Vector{Pkg.Types.RegistrySpec}, depot::String)
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:1010
[7] clone_or_cp_registries
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:1003 [inlined]
[8] clone_default_registries(ctx::Pkg.Types.Context; only_if_empty::Bool)
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:903
[9] clone_default_registries
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:891 [inlined]
[10] up(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; level::Pkg.Types.UpgradeLevel, mode::Pkg.Types.PackageMode, update_registry::Bool, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:241
[11] #up#41
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:83 [inlined]
[12] instantiate(ctx::Pkg.Types.Context; manifest::Nothing, update_registry::Bool, verbose::Bool, platform::Base.BinaryPlatforms.Platform, allow_autoprecomp::Bool, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:1319
[13] instantiate
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:1304 [inlined]
[14] instantiate(; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:1300
[15] instantiate()
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:1300
[16] top-level scope
@ C:\Users\eexsl40\Desktop\Code\main.jl:10
in expression starting at C:\Users\eexsl40\Desktop\Code\main.jl:10

caused by: GitError(Code:ERROR, Class:OS, failed to read data: The server returned an invalid or unrecognized response
)
Stacktrace:
[1] macro expansion
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\LibGit2\src\error.jl:110 [inlined]
[2] clone(repo_url::SubString{String}, repo_path::String, clone_opts::LibGit2.CloneOptions)
@ LibGit2 C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\LibGit2\src\repository.jl:459
[3] clone(repo_url::SubString{String}, repo_path::String; branch::String, isbare::Bool, remote_cb::Ptr{Nothing}, credentials::LibGit2.CachedCredentials, callbacks::Dict{Symbol, Tuple{Ptr{Nothing}, Any}})
@ LibGit2 C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\LibGit2\src\LibGit2.jl:583
[4] clone(ctx::Pkg.Types.Context, url::String, source_path::String; header::String, credentials::Nothing, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.GitTools C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\GitTools.jl:109
[5] (::Pkg.Types.var"#81#84"{Pkg.Types.Context, String, Pkg.Types.RegistrySpec})(tmp::String)
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:1031
[6] mktempdir(fn::Pkg.Types.var"#81#84"{Pkg.Types.Context, String, Pkg.Types.RegistrySpec}, parent::String; prefix::String)
@ Base.Filesystem .\file.jl:729
[7] mktempdir (repeats 2 times)
@ .\file.jl:727 [inlined]
[8] clone_or_cp_registries(ctx::Pkg.Types.Context, regs::Vector{Pkg.Types.RegistrySpec}, depot::String)
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:1010
[9] clone_or_cp_registries
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:1003 [inlined]
[10] clone_default_registries(ctx::Pkg.Types.Context; only_if_empty::Bool)
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:903
[11] clone_default_registries
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:891 [inlined]
[12] up(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; level::Pkg.Types.UpgradeLevel, mode::Pkg.Types.PackageMode, update_registry::Bool, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:241
[13] #up#41
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:83 [inlined]
[14] instantiate(ctx::Pkg.Types.Context; manifest::Nothing, update_registry::Bool, verbose::Bool, platform::Base.BinaryPlatforms.Platform, allow_autoprecomp::Bool, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:1319
[15] instantiate
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:1304 [inlined]
[16] instantiate(; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:1300
[17] instantiate()
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:1300
[18] top-level scope
@ C:\Users\eexsl40\Desktop\Code\main.jl:10

In my case, it seems this is a network issue.
I tried running git separately and I got network unreachable error.

ssh: connect to host github.com port 22: Network is unreachable
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I changed network e.g. Hotspot mobile data, and everything runs fine.
I moved houses with a Virgin Media wireless network, and that seemed to be the problem.

Seems very likely that you are behind a firewall that blocks github.com and maybe intercepts https requests and sends some bogus reply instead of the actual server response. You could try the latest beta release of Julia 1.7 which may improve this by not using git for getting registry updates. You’ll probably want to clear our your ~/.julia/registries directory when you try that.

1 Like