From b46a89549eea78daa838f8f3d15a766f52a633b8 Mon Sep 17 00:00:00 2001 From: "Isaac I.Y. Saito" <130s@2000.jukuin.keio.ac.jp> Date: Wed, 14 Sep 2022 00:26:14 -0400 Subject: [PATCH] Attempt #14 1) Seems base64 decode is not needed if tr runs with -d https://gitlab.com/gitlab-examples/ssh-private-key/-/issues/1#note_48526556. 2) Removing suppression of ssh-add output to get more info desperately. --- gitlab.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitlab.sh b/gitlab.sh index 5ce772f3f..3105b51c4 100755 --- a/gitlab.sh +++ b/gitlab.sh @@ -38,7 +38,7 @@ if [ -n "$SSH_PRIVATE_KEY" ]; then PRKEY_EXTENDED="${SSH_PRIVATE_KEY}\n" echo -e "DEBUG: ssh key: ${SSH_PRIVATE_KEY}" # add key to agent - echo -n "${SSH_PRIVATE_KEY}" | tr -d '\r' | base64 --decode | ssh-add - > /dev/null || { res=$?; echo "could not add ssh key"; exit $res; } + echo -n "${SSH_PRIVATE_KEY}" | tr -d '\r' | ssh-add - || { res=$?; echo "could not add ssh key"; exit $res; } if [ -n "$SSH_SERVER_HOSTKEYS" ]; then mkdir -p ~/.ssh # setup known hosts