Problem
As of March 15, 2022, GitHub no longer supports the DSA SHA256 key type. Custom images with git installed before November 16, 2021, may fail during checkout with this error:
Either git or ssh (required by git to clone through SSH) is not installed in the image Cloning git repository error cloning repository: ssh: handshake failed: knownhosts: key mismatch
Solution
Update git on your custom image and use one of GitHub's recommended SSH key types.
To update your SSH key type:
- Generate a new SSH key using an algorithm that GitHub supports (RSA with SHA-2, Ed25519, ECDSA, or Ed25519-sk)
- Add the new key to your GitHub account
Comments
Article is closed for comments.