From 50f53d3a359966e2e3acd0f4e77602748f9fd574 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Fri, 9 Jan 2026 14:07:30 +0900 Subject: [PATCH] Fix REMOTE HOST in new clone for host in ssh config check --- src/bin/new_clone.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/new_clone.sh b/src/bin/new_clone.sh index aacc40b..ce82e16 100755 --- a/src/bin/new_clone.sh +++ b/src/bin/new_clone.sh @@ -122,7 +122,7 @@ else fi; # set remote host if not set to the ssh config name if [ -z "${REMOTE_HOST}" ]; then - REMOTE_HOST="${GIT_REPOSITORY_NAME}"; + REMOTE_HOST="$(basename "${REPOSITORY}" .git)"; fi; if [ $error -eq 1 ]; then exit; @@ -131,7 +131,7 @@ fi; error=0 echo "* Validate SSH PEM Key exist and SSH config"; if ! grep "Host ${REMOTE_HOST}" "${GIT_WEBHOOK_BASE_FOLDER}"/.ssh/config; then - echo "[!] ssh config entry for Host ${REMOTE_HOST} is missing"; + echo "[!] ssh config entry for Host ${REMOTE_HOST} is missing in ${GIT_WEBHOOK_BASE_FOLDER}/.ssh/config"; error=1; else # make sure the identiy file is there