I am running a script in the ubuntu vm and I am trying to clone from my private repo.
I added keygen in my script for ssh clone but I get an error. This is what my script looks like and the error
echo ">> Checking out $GITHUB_PAGES_BRANCH branch from $GITHUB_PAGES_REPO"
cd /tmp/helm/publish
mkdir -p "$HOME/.ssh"
ssh-keyscan -H github.com >> "$HOME/.ssh/known_hosts"
echo "CLONING:::::"
git clone -b "$GITHUB_PAGES_BRANCH" "git@github.com:$GITHUB_PAGES_REPO.git" .
echo "CLONED :::::"
ls
I get this error in my console
>> Checking out test-branch branch from getME/demo
# github.com:22 SSH-2.0-babeld-cXXXXX
# github.com:22 SSH-2.0-babeld-cXXXXX
# github.com:22 SSH-2.0-babeld-cXXXXX
# github.com:22 SSH-2.0-babeld-cXXXXX
# github.com:22 SSH-2.0-babeld-cXXXXX
CLONING:::::
Cloning into '.'...
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
CLONED :::::
I am running this script on Github Actions.
Any help is appreciated.