Host key verification failed on Windows on 0.9.0
See https://github.com/webfactory/ssh-agent/pull/17#issuecomment-1798849240
Creating an actual issue to track this rather than people commenting on that PR.
Downgrading does fix the issue, but since nodeJS 16 is being deprecated in GitHub actions it may no longer be a workaround in the future.
I hit this issue too with a docker based workflow, downgrading to 0.7.0 sorted it for me too
Same boat here - we're using 0.6.0 for now as it's stable as 0.8.0 didn't work, but keen to see once this is working on node 20. Thanks for the support here!
Same for me on windows node with 0.9.0
same for me on windows
Can we have updates on it ?
As this is yet to be resolved, I found a workaround by adding github.com ssh key to known_hosts file:
- name: Configure SSH agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ YOUR_SECRET_KEY }}
- name: Add GitHub to the SSH known hosts file
run: |
curl -L -o jq.exe https://github.com/jqlang/jq/releases/latest/download/jq-win64.exe
curl --silent https://api.github.com/meta | jq --raw-output "\"github.com \"+.ssh_keys[]" >> %USERPROFILE%/.ssh/known_hosts
This PR (https://github.com/webfactory/ssh-agent/pull/186) is close to @tzuriel-spearuav fix
Don't know, last commit is 10 month ago. In my case just moved to a better rounded solution instead of some ssh shortcut and tricks. Good luck mate ¯_(ツ)_/¯
@Waxo What was the better solution?
In my case I was using github for dart/flutter dependencies, we just swap to a paid private repository. Not sure if applicable for you.
@tzuriel-spearuav Thanks for the tip! Your snippet didn't work for me as is though but I was able to make it work with small modifications. This is what worked for me:
#...
jobs:
my_job:
runs-on: windows-latest
steps:
- name: Configure SSH agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.YOUR_SECRET_KEY }}
- name: Add GitHub to the SSH known hosts file
shell: bash
run: |
curl -L -o jq.exe https://github.com/jqlang/jq/releases/latest/download/jq-win64.exe
mkdir -p $HOME/.ssh
curl --silent https://api.github.com/meta | jq --raw-output '"github.com "+.ssh_keys[]' >> $HOME/.ssh/known_hosts
#...