Host auth check fi for new clone

This commit is contained in:
2025-07-04 15:12:30 +09:00
parent ab3cfa70ff
commit 1ba2c19345

View File

@@ -46,7 +46,8 @@ else
# grep "IdentityFile" in this
SSH_TEST=("${SUDO_COMMAND[@]}" "ssh" "${REMOTE_HOST}");
result=$("${SSH_TEST[@]}" 2>&1);
validate_string="You've successfully authenticated with the key"
# this can be key or deploy key
validate_string="You've successfully authenticated with the "
if [[ "$result" != *"$validate_string"* ]]; then
echo "Could not connect to ${REMOTE_HOST}: ${result}";
error=1;