From d615aa526ecc25d80d8ec3d0779d97c0e2cee461 Mon Sep 17 00:00:00 2001 From: Geoffrey van Wyk Date: Wed, 17 Apr 2024 03:47:49 +0200 Subject: [PATCH] fix(cli,install): authenticity of host 'github.com' can't be established This occurs because the URL used to connect to GitHub is for SSH. This is not necessary. HTTPS is enough. This causes the `install_plugins` command to hang when used noninteractively on automation platforms such as GitHub Actions or Ansible. Resolves #219 --- scripts/install_plugins.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install_plugins.sh b/scripts/install_plugins.sh index e2450ac..e19d8ee 100755 --- a/scripts/install_plugins.sh +++ b/scripts/install_plugins.sh @@ -17,10 +17,10 @@ clone() { local branch="$2" if [ -n "$branch" ]; then cd "$(tpm_path)" && - GIT_TERMINAL_PROMPT=0 git clone -b "$branch" --single-branch --recursive "$plugin" >/dev/null 2>&1 + GIT_TERMINAL_PROMPT=0 GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=yes' git clone -b "$branch" --single-branch --recursive "$plugin" >/dev/null 2>&1 else cd "$(tpm_path)" && - GIT_TERMINAL_PROMPT=0 git clone --single-branch --recursive "$plugin" >/dev/null 2>&1 + GIT_TERMINAL_PROMPT=0 GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=yes' git clone --single-branch --recursive "$plugin" >/dev/null 2>&1 fi } @@ -31,7 +31,7 @@ clone_plugin() { local plugin="$1" local branch="$2" clone "$plugin" "$branch" || - clone "https://git::@github.com/$plugin" "$branch" + clone "https://github.com/$plugin" "$branch" } # clone plugin and produce output