Help with creating a local repo

Hi,

At my local place of employment we work behind a firewall and have to create local repositories for all the languages we use (CRAN, Pypi, etc.)

I’ve been trying to understand how to do that exact thing for julia with Pkg3, but have not been able to find a clear step-by-step algorithm.

Can anyone suggest such a guide, or perhaps write a short one ad-hoc?

The end result would need to be seamless. That is, using “Pkg add X” should install X from the local repo with no further intervention.

3 Likes

Same here! Any hints on how to set up Julia + packages behind a firewall would be great.

I’ve poked around a bit and it seems like a registry is just a directory in .julia/registries with a Registry.toml. Removing/renaming that file makes the package manager no longer recognise the base registry. You can take a look at its repo to get a feel for how Registry.toml works. The gist of it seems to be a key value store of uuid = { name = <name>, path = <relative to Registry.toml>} with some more info about the package versions and its dependencies in those paths. It’s heavily interconnected with METADATA.jl at the moment, so it might be best to wait until we’ve transitioned to the new Package tracking mechanism.

Does anyone have a solid “how to” on this now that we have some lead time with 1.0 and the new Pkg system.

You may find this post from last year useful. An example registry is here.

I found that it’s very easy to end up with TOML parser errors that are regrettably hard to parse.

1 Like