# Problem adding a local registry from remote

**URL:** <https://discourse.julialang.org/t/problem-adding-a-local-registry-from-remote/52500>\
**Category:** General Usage\
**Tags:** registry\
**Created:** [December 28, 2020, 9:56am UTC](https://discourse.julialang.org/t/problem-adding-a-local-registry-from-remote/52500 "2020-12-28T09:56:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Post date:** [December 28, 2020, 9:56am UTC](https://discourse.julialang.org/t/problem-adding-a-local-registry-from-remote/52500/1 "2020-12-28T09:56:28Z")

</div>

I made a local registry with [LocalRegistry.jl](https://github.com/GunnarFarneback/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:

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

---

<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:** [December 28, 2020, 6:03pm UTC](https://discourse.julialang.org/t/problem-adding-a-local-registry-from-remote/52500/2 "2020-12-28T18:03:28Z")

</div>

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