Describe the bug
SSH host key validation failed on OSX but succeeded on Linux when checking out a repository from ssh://github.com
Area for Triage:
Question, Bug, or Feature?:
Virtual environments affected
Expected behavior
The same behaviour on both OSX and Linux. Either both fail or neither.
Actual behavior
The following workflow succeeded on Linux with a warning message during the checkout phase indicating that the host key of github.com was added . On OSX it failed with a Host key verification failed error message. This suggests to me that SSH is configured to be more tolerant on Linux but not on OSX.
steps:
- name: Configure SSH
shell: bash
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
- uses: actions/checkout@v1
with:
submodules: recursive
The issue is easily worked around by adding ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts to the Configure SSH step. However, it would be good if SSH was configured as consistently as possible across the different environments. Perhaps we could even add github.com to the known hosts file in the image.
Hello, pull request was merged. Changes would be added in the next images rollout.
Great, thanks!
@aibaars the image with changes has been deployed. Could you check the behavior, please?
It works for me, thanks!