feature: allow to connect as root
Gitea/docker-base-images/jenkins-ssh-agent-jdk17-dind/pipeline/head This commit looks good

This commit is contained in:
amorozov committed 2025-03-03 04:08:14 +03:00
1 parent 02f3aec625
commit 44c51a62e5
2 files changed
+6 -1

No files matched your search

+5
View File
@@ -43,6 +43,11 @@ write_key() {
echo "$1" > "${JENKINS_AGENT_HOME}/.ssh/authorized_keys"
chown -Rf "${ID_GROUP}" "${JENKINS_AGENT_HOME}/.ssh"
chmod 0700 -R "${JENKINS_AGENT_HOME}/.ssh"
mkdir -p "/root/.ssh"
echo "$1" > "/root/.ssh/authorized_keys"
chown -Rf "root /root/.ssh"
chmod 0700 -R "/root/.ssh"
}
if [[ ${JENKINS_AGENT_SSH_PUBKEY} == ssh-* ]]; then