diff --git a/services/gitea/deployment.yaml b/services/gitea/deployment.yaml index ff2c98b65..ab0fe963a 100644 --- a/services/gitea/deployment.yaml +++ b/services/gitea/deployment.yaml @@ -228,6 +228,15 @@ spec: args: - | set -euo pipefail + # Keep OpenSSH StrictModes satisfied if another PVC consumer + # changes the shared Git directory permissions. + chmod 0755 /data/git + if [ -d /data/git/.ssh ]; then + chmod 0700 /data/git/.ssh + fi + if [ -f /data/git/.ssh/authorized_keys ]; then + chmod 0600 /data/git/.ssh/authorized_keys + fi export GITEA__security__SECRET_KEY="$(tr -d '\r\n'