Hope you are doing well .. I am new to CI/CD and implementing via GitHub Actions. I followed steps and having an issue on deployment. I am getting this error
Run ssh -p 2200 ***@*** "cd *** && git checkout *** && git pull && exit"
Host key verification failed.
Error: Process completed with exit code 255.
and my ymal file is
on:
push:
branches:
- master
workflow_dispatch:
jobs:
run_pull:
name: run pull
runs-on: ubuntu-latest
steps:
- name: connect and pull
run: ssh -p 2200 ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd ${{ secrets.WORK_DIR }} && git checkout ${{ secrets.MAIN_BRANCH }} && git pull && exit"
I generated the SSH key and added into authorized_keys, i get GitHub Fingureprints from https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints and add them to known_host. but still getting this error.
Any clue, am i doing something wrong or missing something ? thanks in advance.
PS: I want to deploy a PHP script to Server via SSH
I have similar problem.
One of root causes was missed rec in
~/.ssh/authorized_keys
After fix, all works for me with next config