From 7bed5fb48d40665abfab204f8d942d3ee9db3a4c Mon Sep 17 00:00:00 2001 From: "Isaac I.Y. Saito" <130s@2000.jukuin.keio.ac.jp> Date: Fri, 5 Nov 2021 20:51:52 -0400 Subject: [PATCH] [fix] gitlab ssh-add failure, taking advice https://github.com/ros-industrial/industrial_ci/issues/756#issuecomment-962269318 --- gitlab.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gitlab.sh b/gitlab.sh index 7ec57bda7..33888aa31 100755 --- a/gitlab.sh +++ b/gitlab.sh @@ -34,8 +34,11 @@ if [ -n "$SSH_PRIVATE_KEY" ]; then # start SSH agent # shellcheck disable=SC2046 eval $(ssh-agent -s) + # Avoiding https://github.com/ros-industrial/industrial_ci/issues/756 + echo "${SSH_PRIVATE_KEY}" | tr -d ' ' | base64 --decode > private.ssh_key + chmod 600 private.ssh_key # add key to agent - ssh-add <(echo "$SSH_PRIVATE_KEY" | base64 -d) || { res=$?; echo "could not add ssh key"; exit $res; } + ssh-add