basecamp / kamal

Deploy web apps anywhere.
https://kamal-deploy.org
MIT License
10.6k stars 408 forks source link

Version 1.9.1 is broken #1043

Open bhtabor opened 1 day ago

bhtabor commented 1 day ago

This issue is related to the discussion on https://github.com/basecamp/kamal/pull/996#discussion_r1785968483

Perhaps the relaxed safe.directory should be released as v1.9.2 as well. While upgrading, I had to use the following to make the deployment work on Linux.

docker build -t ghcr.io/basecamp/kamal:v1.9.1-fix - <<EOF
FROM ghcr.io/basecamp/kamal:v1.9.1

RUN git config --global --add safe.directory '*'
EOF

alias kamal='docker run -it --rm -v "${PWD}:/workdir" -v "${SSH_AUTH_SOCK}:/ssh-agent" -v /var/run/docker.sock:/var/run/docker.sock -e "SSH_AUTH_SOCK=/ssh-agent" ghcr.io/basecamp/kamal:v1.9.1-fix'

This was the error on v1.9.1

ERROR (SSHKit::Command::Failed): git exit status: 32768
git stdout: Nothing written
git stderr: Cloning into 'workdir'...
fatal: detected dubious ownership in repository at '/workdir/.git'
To add an exception for this directory, call:

    git config --global --add safe.directory /workdir/.git
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.