Pkg.update in Julia 1.5 uses github

When I Pkg.update in Julia 1.5, Pkg seems to still pull from github:

(@v1.5) pkg> up
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General`
   Updating registry at `~/.julia/registries/registryLH`
   Updating git-repo `https://github.com/hendri54/registryLH`
No Changes to `~/.julia/environments/v1.5/Project.toml`
No Changes to `~/.julia/environments/v1.5/Manifest.toml`

Is there a setting that I need to change to switch to the new Pkg protocol?

1 Like

You probably have the General registry as a git repo. Delete it and install it again.

5 Likes

Thank you.

To save other some time, here is what worked for me:

Pkg.Registry.rm("General")
Pkg.Registry.add("General")

Adding via a RegistrySpec(name = "General", url = "https://pkg.julialang.org") did not work (it fell back to installing from github).

12 Likes

You can also do this in Pkg mode with

pkg> registry rm General
pkg> registry add General

The add step can also be done without argument

pkg> registry add

which will install all registries that are known to the package server you are connected to. The default package servers only know about the General registry but it’s possible to set up custom package servers, e.g. in a corporate environment, that can serve additional registries.

Finally, if you have removed all your registries you can even skip the add step. General will be automatically added when you try to install a package.

3 Likes