From 5e8dd409d8107e7869c43fb0a784ebbe52e7ae07 Mon Sep 17 00:00:00 2001 From: "Alex Pooley (@zuedev)" Date: Thu, 7 May 2026 17:54:44 +0100 Subject: Enhance entrypoint script to create and set permissions for authorized_keys in root's .ssh directory --- entrypoint.bash | 3 +++ 1 file changed, 3 insertions(+) diff --git a/entrypoint.bash b/entrypoint.bash index c1e0c0f..f3cd66f 100644 --- a/entrypoint.bash +++ b/entrypoint.bash @@ -5,8 +5,11 @@ # Do we have an authorized_keys environment variable? if [ -n "$AUTHORIZED_KEYS" ]; then echo "Setting up authorized_keys..." + mkdir -p /root/.ssh mkdir -p /home/git/.ssh + echo "$AUTHORIZED_KEYS" > /root/.ssh/authorized_keys echo "$AUTHORIZED_KEYS" > /home/git/.ssh/authorized_keys + chmod 600 /root/.ssh/authorized_keys chmod 600 /home/git/.ssh/authorized_keys chown -R git:git /home/git/.ssh else -- cgit v1.2.3