ci: write the ssh config where ssh reads it !5

merged merged by cmc on 2026-09-10 03:25 UTC · krz/omaha-metro-blotter:ssh-passwd-home into main

1 file changed, +5 −2

Layout: unified · split

.gitbay/ci.yml +5 −2
@@ -22,8 +22,11 @@ jobs:
2222 test -n "$GITBAY_SSH" || { echo "ERROR: GITBAY_SSH is not set; the runner is too old"; exit 1; }
2323 umask 077
2424 printf '%s\n' "$BOT_SSH_KEY" > "$PWD/.bot_key"
25 mkdir -p ~/.ssh
26 printf 'Host %s\n IdentityFile %s\n IdentitiesOnly yes\n StrictHostKeyChecking accept-new\n' "${GITBAY_SSH#*@}" "$PWD/.bot_key" > ~/.ssh/config
25 # ssh expands ~ from the passwd entry, not $HOME; in the build's
26 # container that is /root while $HOME is the build home.
27 sshhome=$(getent passwd "$(id -u)" | cut -d: -f6)
28 mkdir -p "$sshhome/.ssh"
29 printf 'Host %s\n IdentityFile %s\n IdentitiesOnly yes\n StrictHostKeyChecking accept-new\n' "${GITBAY_SSH#*@}" "$PWD/.bot_key" > "$sshhome/.ssh/config"
2730 ssh "$GITBAY_SSH" whoami
2831 - |
2932 set -e