Skip to content

Commit

Permalink
ci: Fix push-docs: Add github.com host key to known hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
lnjX committed Feb 4, 2024
1 parent ee5ec34 commit 2f8c3d0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/travis/push-documentation
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
# SPDX-License-Identifier: CC0-1.0

set -e

# Add ssh push key
eval "$(ssh-agent -s)"
echo $PUSH_KEY_REPO_DOC_QXMPP_ORG | base64 -d | unxz | ssh-add -
Expand Down Expand Up @@ -35,7 +37,14 @@ echo '-------------------------------------------'
echo 'Cloning doc.qxmpp.org repository'
echo '-------------------------------------------'

git clone ssh://[email protected]/qxmpp-project/doc.qxmpp.org
# add github.com to known hosts
mkdir -p ~/.ssh
touch ~/.ssh/known_hosts
ssh-keyscan -t ed25519 github.com >> ~/.ssh/known_hosts
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts

ssh -Tv [email protected] -o StrictHostKeyChecking=no
GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" git clone ssh://[email protected]/qxmpp-project/doc.qxmpp.org

echo '-------------------------------------------'
echo 'Commiting and pushing documentation'
Expand Down

0 comments on commit 2f8c3d0

Please sign in to comment.