From cf78875ab5b4f5cbd9adc171ccb6f80534a585c4 Mon Sep 17 00:00:00 2001 From: Orsiris de Jong Date: Thu, 7 Jul 2022 16:40:26 +0200 Subject: [PATCH] WIP debug github actions tests --- dev/tests/run_tests.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dev/tests/run_tests.sh b/dev/tests/run_tests.sh index a53e18a..57566cb 100755 --- a/dev/tests/run_tests.sh +++ b/dev/tests/run_tests.sh @@ -98,7 +98,7 @@ function SetupSSH { ls "${HOME}" -alh ls "${HOME}/.ssh" -alh - if ! grep "$(cat ${HOME}/.ssh/${PUBKEY_NAME})" "${HOME}/.ssh/authorized_keys"; then + if [ ! -f "${HOME}/.ssh/authorized_keys" ] && ! grep "$(cat ${HOME}/.ssh/${PUBKEY_NAME})" "${HOME}/.ssh/authorized_keys"; then echo "$SSH_AUTH_LINE" >> "${HOME}/.ssh/authorized_keys" #echo "from=\"*\",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,command=\"$FAKEROOT/usr/local/bin/ssh_filter.sh SomeAlphaNumericToken9\" $(cat ${HOME}/.ssh/id_rsa_local_osync_tests.pub)" >> "${HOME}/.ssh/authorized_keys" fi @@ -111,6 +111,9 @@ function SetupSSH { # Update remote conf files with SSH port sed -i.tmp 's#ssh://.*@localhost:[0-9]*/${HOME}/osync-tests/target#ssh://'$REMOTE_USER'@localhost:'$SSH_PORT'/${HOME}/osync-tests/target#' "$CONF_DIR/$REMOTE_CONF" + + ls "${HOME}/.ssh" -alh + cat "${HOME}/.ssh/authorized_keys" } function RemoveSSH {