fix(utils): create ~/.ssh/known_hosts if it does not exist

This commit is contained in:
technofab 2024-02-03 16:18:02 +01:00
parent 262729e9bb
commit 426d89702a

View file

@ -9,6 +9,7 @@
before_script = [
''
eval "$(ssh-agent -s)" >/dev/null;
mkdir -p ~/.ssh; touch ~/.ssh/known_hosts;
ssh-keyscan -t rsa $CI_SERVER_HOST >> ~/.ssh/known_hosts;
echo "$GIT_SSH_PRIV_KEY" | tr -d '\r' | ssh-add - >/dev/null;
git config --global user.email "$GIT_EMAIL" >/dev/null;