Skip to content

Host key verification failed on Windows on 0.9.0 #221

Description

@xanather

See #17 (comment)

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.

Activity

  1. ReFil commented on Jun 5, 2024

    @ReFil

    I hit this issue too with a docker based workflow, downgrading to 0.7.0 sorted it for me too

  2. TheDuckCow commented on Jun 12, 2024

    @TheDuckCow

    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!

  3. krotz-dieter commented on Jun 18, 2024

    @krotz-dieter

    Same for me on windows node with 0.9.0

  4. MoustaphaSaad commented on Jul 6, 2024

    @MoustaphaSaad

    same for me on windows

  5. Waxo commented on Aug 28, 2024

    @Waxo

    Can we have updates on it ?

  6. tzuriel-spearuav commented on Sep 5, 2024

    @tzuriel-spearuav

    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/ssh-agent@v0.9.0
            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
    
  7. Waxo commented on Sep 5, 2024

    @Waxo

    This PR (#186) is close to @tzuriel-spearuav fix

  8. Waxo commented on Dec 4, 2024

    @Waxo

    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 ¯_(ツ)_/¯

  9. mmerlo commented on Apr 29, 2025

    @mmerlo

    @Waxo What was the better solution?

  10. Waxo commented on Apr 30, 2025

    @Waxo

    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.

  11. Haprog commented on Oct 27, 2025

    @Haprog

    @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/ssh-agent@v0.9.1
            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
    #...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions