# Pkg.update in Julia 1.5 uses github

**URL:** https://discourse.julialang.org/t/pkg-update-in-julia-1-5-uses-github/44331
**Category:** General Usage
**Tags:** question, package
**Created:** [August 5, 2020, 12:49pm UTC](https://discourse.julialang.org/t/pkg-update-in-julia-1-5-uses-github/44331 "2020-08-05T12:49:44Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![hendri54](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hendri54/32/9621_2.png) [@hendri54](https://discourse.julialang.org/u/hendri54)
#### Post date: [August 5, 2020, 12:49pm UTC](https://discourse.julialang.org/t/pkg-update-in-julia-1-5-uses-github/44331/1 "2020-08-05T12:49:44Z")

</div>

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

```julia
(@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?

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [August 5, 2020, 12:51pm UTC](https://discourse.julialang.org/t/pkg-update-in-julia-1-5-uses-github/44331/2 "2020-08-05T12:51:45Z")

</div>

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

---

<div class="post-metadata">

### Author: ![hendri54](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hendri54/32/9621_2.png) [@hendri54](https://discourse.julialang.org/u/hendri54)
#### Post date: [August 5, 2020, 1:44pm UTC](https://discourse.julialang.org/t/pkg-update-in-julia-1-5-uses-github/44331/3 "2020-08-05T13:44:31Z")

</div>

Thank you.

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

```julia
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).

---

<div class="post-metadata">

### Author: ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)
#### Post date: [August 5, 2020, 4:14pm UTC](https://discourse.julialang.org/t/pkg-update-in-julia-1-5-uses-github/44331/4 "2020-08-05T16:14:08Z")

</div>

You can also do this in Pkg mode with

```julia
pkg> registry rm General
pkg> registry add General

```

The add step can also be done without argument

```julia
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.

---

<div class="post-metadata">

### Author: ![pierre-haessig](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pierre-haessig/32/217129_2.png) [@pierre-haessig](https://discourse.julialang.org/u/pierre-haessig)
#### Post date: [January 19, 2023, 1:34pm UTC](https://discourse.julialang.org/t/pkg-update-in-julia-1-5-uses-github/44331/5 "2023-01-19T13:34:35Z")

</div>

On Julia 1.8.5 on Linux, it seems the “registry rm+add” procedure may still add the Github URL:

```julia
@v1.8) pkg> registry rm General
    Removing registry `General` from ~/.julia/registries/General

(@v1.8) pkg> registry add
  Installing known registries into `~/.julia`

(@v1.8) pkg> registry status
Registry Status 
 [23338594] General (https://github.com/JuliaRegistries/General.git)

```

Is it because of my `~/.julia` directory (or other) contains spoiled content from older Julia version?

---

<div class="post-metadata">

### Author: ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)
#### Post date: [January 19, 2023, 2:43pm UTC](https://discourse.julialang.org/t/pkg-update-in-julia-1-5-uses-github/44331/6 "2023-01-19T14:43:36Z")

</div>

I don’t think you can draw any conclusions from the output of the General registry URL. This is how it looks when you install the registry from a package server:

```julia
$ mkdir /tmp/testdepot1
$ JULIA_DEPOT_PATH=/tmp/testdepot1 julia 
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.8.5 (2023-01-08)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

(@v1.8) pkg> registry add
  Installing known registries into `/tmp/testdepot1`

(@v1.8) pkg> registry status
Registry Status 
 [23338594] General (https://github.com/JuliaRegistries/General.git)

```

and this is how it looks when you install it as a git clone from GitHub.

```julia
$ mkdir /tmp/testdepot2
$ JULIA_DEPOT_PATH=/tmp/testdepot2 JULIA_PKG_SERVER="" julia 
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.8.5 (2023-01-08)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

(@v1.8) pkg> registry add
  Installing known registries into `/tmp/testdepot2`
     Cloning registry from "https://github.com/JuliaRegistries/General.git"
       Added registry `General` to `/tmp/testdepot2/registries/General`

(@v1.8) pkg> registry status
Registry Status 
 [23338594] General (https://github.com/JuliaRegistries/General.git)

```

The only factor that should matter for the kind of installation is the setting of the environment variable `JULIA_PKG_SERVER`. I’m not sure whether there is any fallback mechanism to git in case of a failure to reach the package server.
