# Migrate private registry to new server using LocalRegistry.jl

**URL:** https://discourse.julialang.org/t/migrate-private-registry-to-new-server-using-localregistry-jl/100859
**Category:** General Usage
**Tags:** question, package-manager, package-management
**Created:** [June 26, 2023, 8:49pm UTC](https://discourse.julialang.org/t/migrate-private-registry-to-new-server-using-localregistry-jl/100859 "2023-06-26T20:49:06Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)
#### Post date: [June 26, 2023, 8:49pm UTC](https://discourse.julialang.org/t/migrate-private-registry-to-new-server-using-localregistry-jl/100859/1 "2023-06-26T20:49:07Z")

</div>

Hi,

I am using LocalRegistry.jl to manage a private package ecosystem. I need to move the registry and package ecosystem to a new server. How to I ensure that the registry and projects using the registry and package ecosystem continue to work?

Thank you!

---

<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: [June 26, 2023, 9:08pm UTC](https://discourse.julialang.org/t/migrate-private-registry-to-new-server-using-localregistry-jl/100859/2 "2023-06-26T21:08:58Z")

</div>

1. Move the packages and registry repository to the new server.
2. In the registry, update the package URLs in the `repo` field of all `*/*/Package.toml` files for the new server.
3. In the Julia installations using your private registry, do

```julia
pkg> registry rm NAME_OF_REGISTRY
pkg> registry add NEW_URL_OF_REGISTRY

```

For completeness you can also update the `repo` field of `Registry.toml` in the registry repo, but I don’t think that information is actually used anywhere.

---

<div class="post-metadata">

### Author: ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)
#### Post date: [June 27, 2023, 10:54am UTC](https://discourse.julialang.org/t/migrate-private-registry-to-new-server-using-localregistry-jl/100859/3 "2023-06-27T10:54:49Z")

</div>

Thank you for your reply. I had a chance to try it out this morning, but it did not work unfortunately. Unlike the previous server I used, the new server uses ssh instead of https. I suspect this might be the culprit.

When I interface with the repo via the command line, everything works as expected. However, when I update a package from my project, the system stalls. Here is what I get:

(my\_project) pkg\> update MyPackage  
Updating registry at `C:\Users\christopher.fisher\.julia\registries\MyPrivateRegistry`  
Updating git-repo `git@gitlab.url`  
Private key location for ‘git@gitlab.url’ [C:\Users\christopher.fisher\location]:

(I removed some of the specific information). It just hangs here while looking for the ssh key. Do you have any advice for moving forward?

Thank you!

---

<div class="post-metadata">

### Author: ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)
#### Post date: [June 27, 2023, 11:11am UTC](https://discourse.julialang.org/t/migrate-private-registry-to-new-server-using-localregistry-jl/100859/4 "2023-06-27T11:11:34Z")

</div>

I am using RSA and found this issue: [Github droped support for ssh keys with rsa · Issue #55 · GunnarFarneback/LocalRegistry.jl · GitHub](https://github.com/GunnarFarneback/LocalRegistry.jl/issues/55)

I switched to ecdsa, and it appears to be working.

---

<div class="post-metadata">

### Author: ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)
#### Post date: [June 27, 2023, 11:35am UTC](https://discourse.julialang.org/t/migrate-private-registry-to-new-server-using-localregistry-jl/100859/5 "2023-06-27T11:35:48Z")

</div>

Ok. Everything is working. Thanks for your help!

This might be obvious to those who do this often, but remember to switch your default remote location with git remote set-url origin url\_here.
