Problem adding a local registry from remote

I made a local registry with LocalRegistry.jl, and set its remote in a private network to share it with colleagues. I can work with that local registry without problems, but other people have problems when they try to add it from the remote: ]registry add path-to-remote starts copying the contents from the remote, but then throws:

ERROR: no `Registry.toml` file in cloned registry.

After some experiments, I guess that that instruction is copying the contents of the bare remote, instead of cloning it as a working tree, and that’s why it does not find the expected contents. If I replace path-to-remote to a directory that contains a working copy of my local registry, it seems be working.

On the other hand, Pkg.Registry.add(RegistrySpec(url="path-to-remote")) does clone the remote and works as I expected.

Were my expectations wrong with respect to ]registry add ?

]registry add tries to guess what you mean and if you just give it a path it assumes that it points to a directory that contains your registry as is. If you want it to interpret a local path as a URL and be understood as a git repository, you can try with ]registry add file://path-to-remote.

2 Likes