hashicorp / nomad-pack

Mozilla Public License 2.0
397 stars 52 forks source link

nomad-pack on a computer without Internet access #285

Open borbul2007 opened 2 years ago

borbul2007 commented 2 years ago

Hello! I use nomad-pack on a computer without Internet access and going to use custom nomad pack registry only but when a I run: nomad-pack registry add <my _registry> I get error:

go-getter URL is github.com/hashicorp/nomad-pack-community-registry ! Could Not Install Registry Error: error downloading 'https://github.com/hashicorp/nomad-pack-community-registry.git': /usr/bin/git exited with 128: Cloning into '/home/nomad-pack/.cache/nomad/packs/nomad-pack-tmp'... fatal: unable to access 'https://github.com/hashicorp/nomad-pack-community-registry.git/': Failed to connect to github.com port 443 after 127222 ms: Operation timed out Type: *errors.errorString Context:

I tried deleting the default registry but got the same error. What settings should I change to use my own registry instead of the default registry?

nomad-pack version v.0.0.1-techpreview.3

attachmentgenie commented 2 years ago

The community registry is always installed upon running a "nomad-pack registry *" command unless a directory called default is present in the cache directory. I tend to shortcut this behavior by simply creating a empty directory placeholder. ( in my case ~/.cache/nomad/packs/default)

borbul2007 commented 2 years ago

Thanks @attachmentgenie for the advice but I'm getting the following error:

! Could Not Install Registry Error: relative paths require a module with a pwd Type: *errors.errorString Context:

attachmentgenie commented 2 years ago

could you share the command you are executing?

borbul2007 commented 2 years ago

./nomad-pack registry add test mygitlab.com/...../nomad-pack-registry