Cannot push files because key fingerprint doesn't match my saved SSH key #48086
-
Problem with SSH key I created a new SSH key and saved it to my account, deleting my old one. Now when I try to push my files to a repo, I'm getting this error: The authenticity of host 'github.com (140.82.112.4)' can't be established. Please make sure you have the correct access rights The key fingerprint shown above does not match the SSH key I saved. How do I fix this? |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 12 replies
-
Hi @hmkonz, The GitHub Community on Discussions is a space for all GitHub users to come and discuss ideas and projects. Your duplicate post was removed because it contained content that violates our Community Code of Conduct, including posting the same comment in multiple places. As a result, we have removed the duplicate post, and we ask that you no longer cross-post. For additional guidance, please review our Community on Discussions Code of Conduct and GitHub’s Terms of Service. |
Beta Was this translation helpful? Give feedback.
-
That message is not about your key, it's about the key used to identify the GitHub server. SSH uses authentication with the host key to ensure no-one can trick you into connecting to an attacker's server instead. But SSH can't know if the host key is the right one for that server by itself, so it's asking you to check if that key is correct for GitHub publishes their key fingerprints here: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints Make sure the fingerprint you're seeing is one of those (depending on the key type), and accept if it is. SSH will remember that for future connection. If the key fingerprint you see is not on the list, figure out who's messing with your network. |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as spam.
This comment was marked as spam.
-
not publish my project |
Beta Was this translation helpful? Give feedback.
That message is not about your key, it's about the key used to identify the GitHub server. SSH uses authentication with the host key to ensure no-one can trick you into connecting to an attacker's server instead. But SSH can't know if the host key is the right one for that server by itself, so it's asking you to check if that key is correct for
github.com
(or whichever other server you're connecting to).GitHub publishes their key fingerprints here: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints
Make sure the fingerprint you're seeing is one of those (depending on the key type), and accept if it is. SSH will remember that for fu…