Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Failed to add host to known hosts #49

Open
vc-vijaysh-karnure opened this issue Mar 4, 2024 · 1 comment
Open

Error: Failed to add host to known hosts #49

vc-vijaysh-karnure opened this issue Mar 4, 2024 · 1 comment

Comments

@vc-vijaysh-karnure
Copy link

Issue

Run MrSquaare/ssh-setup-action@v3
SSH initialized.
SSH agent initialized.
Failed to add host to known hosts: 
Error: Error: Failed to add host to known hosts

Description

While running on GitHub Actions Runner we are getting the following error

Run MrSquaare/ssh-setup-action@v3
SSH initialized.
SSH agent initialized.
Failed to add host to known hosts: 
Error: Error: Failed to add host to known hosts

The docker container image is created FROM ghcr.io/actions/actions-runner:latest

We also tried granting the necessary permissions in the pipeline

mkdir -p /home/runner/.ssh/
sudo touch /home/runner/.ssh/known_hosts
sudo chmod 777 /home/runner/.ssh/known_hosts
sudo chown -R "runner:docker" /home/runner/.ssh/

@MrSquaare
Copy link
Owner

MrSquaare commented Mar 22, 2024

Hello! Sorry for the delay, have you found a solution since? The command producing the error is ssh-keyscan -h <your_host>, if you run it in the same context, do you have the same problem? Is your host accessible from container?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants