base-image-build/scripts/utils/initSSHclient.sh
Radostin Emanuilov 5588420eaa
ci: fix initSSH
2024-08-23 21:53:35 +01:00

12 lines
347 B
Bash

#!/bin/bash
set -e
if [ -n "$CI" ]; then
mkdir $SECURE_FILES_DOWNLOAD_PATH
echo "$BUILDER_PUBLIC_KEY" > $SECURE_FILES_DOWNLOAD_PATH/id_ed25519.pub
echo "$BUILDER_PRIVATE_KEY" > $SECURE_FILES_DOWNLOAD_PATH/id_ed25519
chmod -R 600 $SECURE_FILES_DOWNLOAD_PATH
fi
eval "$(ssh-agent -s)"
ssh-add $SECURE_FILES_DOWNLOAD_PATH/id_ed25519