ssh-key-action: Host Key Verification Failed (bitbucket)

I have a package hosted in a private bitbucket repository and I’m using your script the following way: - name: Install SSH key uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.BITBUCKET_ACCESS_KEY }} known_hosts: ${{ secrets.KNOWN_HOSTS }}

and KNOWN_HOST value is: bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==

However, yarn install always fails with “Host Key Verification Failed”.

(I went reading #56 but still the same)

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 21 (6 by maintainers)

Most upvoted comments

I’ve had to echo "" >> ~/.ssh/known_hosts after shimataro/ssh-key-action to ~/.ssh/known_hosts, otherwise when the next entry to ~/.ssh/known_hosts is added (automatically) it is clobbered onto the same line.

     - name: install bitbucket ssh key
        uses: shimataro/ssh-key-action@v2
        with:
          key: ${{ secrets.BITBUCKET_SSH }}
          name: bitbucket-key
          known_hosts: ${{ secrets.BITBUCKET_HOST }}
          config: |
            Host bitbucket.org
              IdentityFile ~/.ssh/bitbucket-key
      - run: echo "" >> ~/.ssh/known_hosts

But looks like it went through this morning. I will confirm on Monday as I’m not going to receive new PR this week-end.