registry:
server: ghcr.io
username: myuser
password: ["KAMAL_REGISTRY_PASSWORD"]
and the following in .env
:
KAMAL_REGISTRY_PASSWORD=the_password
I get the following when running kamal registry login
:
ERROR (SSHKit::Command::Failed): docker exit status: 256
docker stdout: Nothing written
docker stderr: WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get "https://ghcr.io/v2/": denied: denied
However, if I inline the env var like this: KAMAL_REGISTRY_PASSWORD=the_password kamal registry login
then it logs in successfully.
So it appears that for some reason it's not auto-loading the vars in the .env
.
Do I need to do anything special to get dotenv to load the file?
This format sets the password as-is instead of loading from .env:
password: ["KAMAL_REGISTRY_PASSWORD"]
You want something like this. If you only need the one username then you can keep that like you have but the password part should be structured like this to load from .env.
registry:
username:
- KAMAL_REGISTRY_USERNAME
password:
- KAMAL_REGISTRY_PASSWORD
heys guys,
having the same problem
ERROR (SSHKit::Command::Failed): docker exit status: 256
docker stdout: Nothing written
docker stderr: WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get "https://registry-1.docker.io/v2/": EOF
when running kamal setup
This happens to me when using a non-root user.
These commands that I've manually run helped (source):
# no need to add a docker group, it's already exists
# sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
Hey Folks,
I had the same problem as @lethunder
ERROR (SSHKit::Command::Failed): docker exit status: 256
docker stdout: Nothing written
docker stderr: WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get "https://registry-1.docker.io/v2/": EOF
It turned out it was because docker was not running. I turned on docker via the Desktop app on my m2 Mac