SSH key erroneously unverified automatically #23195
-
Baffled by failure to push well-established repo to GitHub.
My |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 1 reply
-
I’m having this problem as well and followed the instructions provided by GH here to no avail. My SSH settings page doesn’t show an “Approve” button for my SSH key, and my key on GH matches up with what I temporarily solved the issue by deleting my key in GH, generating a new one, and adding it to GH. Unfortunately, when I tried a git command for the first time today, the issue came back. I’m on a Mac running macOS Catalina 10.15.5. Any help would be much appreciated! |
Beta Was this translation helpful? Give feedback.
-
Also experiencing the same issue |
Beta Was this translation helpful? Give feedback.
-
I’ve seemingly solved the issue here. Don’t know whether this was due to a mistake on my part or GitHub’s … I’m pretty sure that, on this occasion, the cause was my error even though GitHub reported the wrong error message and the wrong SSH key’s fingerprint in its error message. I discovered my error by adding This revealed that I had mis-spelled the So this is what I have now on my MacOS
|
Beta Was this translation helpful? Give feedback.
-
You may be onto something @iainhouston. I just had the wildcard Host entry in my ssh config. Added an explicit entry for github.com like you have and it’s working now! |
Beta Was this translation helpful? Give feedback.
-
Brilliant! Glad it’s working for you. I still think there’s a bug in that GitHub is reporting a misleading error message and the wrong fingerprint. Will look into how to report bugs to GitHub. |
Beta Was this translation helpful? Give feedback.
-
@henwen I reported this issue at https://support.github.com/contact/feedback |
Beta Was this translation helpful? Give feedback.
-
I only have the wildcard entry, but your answer helped me solve the problem. I stopped receiving the error when I added these config settings that I copied from your above solution:
|
Beta Was this translation helpful? Give feedback.
-
Thank you so so much, this just happened me today and adding
solved my issue. |
Beta Was this translation helpful? Give feedback.
-
I concur. This issue’s been plaguing me for the past month! The fix from post #8 (adapted from post #4) worked for me as well. Thank you all!!! |
Beta Was this translation helpful? Give feedback.
-
Had this same issue a few times within two days lost like 4 hrs finding solution or work around. I don't think its solely gh issue because when I ran ssh-add -l -E sha256, there were no identities listed even when there were identities listed prior. This might've occurred after I closed a few shells in the term but read on to see how it could also be a gh issue also . I think its a combo of both. If there is no identities listed ssh-add -l -E sha256, add to file ssh-dir-path/known_hosts Then make sure your key for gh matches by running the command 'gh ssh-key list' this is same as https://github.com/settings/keys once logged in, u will not see the actual public key listed there only its name if u give it one with the -t flag (read below) under ssh keys. What u do see as a sort key is the fingerprint (i think). Now here's where the funny stuff happens, so I deleted the key using 'gh ssh-key delete {id#}' which is listed when u run 'gh ssh-key list',then verify I am not being authenticated during a git push with same error and sure enuff I get error: So I re-add the key with 'gh ssh-key add {ssh-dir-path}/id_ed25519.pub -t "{name:string}", then all works. |
Beta Was this translation helpful? Give feedback.
I’ve seemingly solved the issue here. Don’t know whether this was due to a mistake on my part or GitHub’s … I’m pretty sure that, on this occasion, the cause was my error even though GitHub reported the wrong error message and the wrong SSH key’s fingerprint in its error message.
I discovered my error by adding
IdentitiesOnly yes
to my~/.ssh/config
forHost GitHub.com
This revealed that I had mis-spelled the
IdentityFile ~/.ssh/github.rsa
line and the ssh key being used was not the one I intended.So this is what I have now on my MacOS