From d3e44d948378f38031036061dc0bff331d44d961 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Sun, 27 Sep 2020 17:39:37 +0800 Subject: [PATCH] add gitlab ssh key for geo nodes --- tools/ci/utils.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/ci/utils.sh b/tools/ci/utils.sh index 348ebe2700..f7baff5195 100755 --- a/tools/ci/utils.sh +++ b/tools/ci/utils.sh @@ -17,6 +17,13 @@ function add_ssh_keys() { function add_gitlab_ssh_keys() { add_ssh_keys "${GITLAB_KEY}" echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >>~/.ssh/config + + # For gitlab geo nodes + if [ "${LOCAL_GITLAB_SSH_SERVER:-}" ]; then + SRV=${LOCAL_GITLAB_SSH_SERVER##*@} # remove the chars before @, which is the account + SRV=${SRV%%:*} # remove the chars after :, which is the port + printf "Host %s\n\tStrictHostKeyChecking no\n" "${SRV}" >>~/.ssh/config + fi } function add_github_ssh_keys() {