New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: ssh: handshake failed: knownhosts: key mismatch #929
Comments
Apologies if this is just a bug with my ssh config, but I'm imagining there is an assumption of how ssh should be configured for gitbug that I'm missing. |
It could be a go-git issue. Git-bug use go-git for every git manipulation, including push/pull. From what I've seen, it can get confused sometimes by some configurations. |
I'm also on Arch Linux and experienced the same issue. I solved it like this: $ for keytype in rsa ecdsa ed25519; do
ssh-keyscan -t "$keytype" github.com >> ~/.ssh/known_hosts
done
$ |
Mentioned in go-git/go-git#619, go-git may have a fix for this but it's not in a tagged version yet. |
Just made an ecdsa key to try this, I get the following error:
But the error goes back to the initial key mismatch error if I remove the ecdsa entry |
Hm… 🤔 I didn't create an ecdsa key, I just fetched the three keytypes from remote with the |
Thanks, this solved the issue for me! |
Still not working for me, even building from source with the latest version of go-git :( |
Update: Got it to work by ssh-add'ing my rsa key |
Doesn't work for me both ssh-keygen -l -v -f ~/.ssh/id_rsa.pub
3072 SHA256:AxuOIT7oMjUmrtt4x90l2K6qJHRSf2FyjjL8rvvfRPA user@host (RSA)
+---[RSA 3072]----+
| |
| |
| ....o= |
| oo..+*++ |
|oo*=.oo=SE |
|++oo+ o +.. |
|+o.. o o + |
|o*. + . = |
|+oo==+oo . |
+----[SHA256]-----+ More: cat ~/.ssh/config
Host *
IdentityFile ~/.ssh/id_rsa
KexAlgorithms +diffie-hellman-group14-sha1
cat ~/.ssh/known_hosts | grep gitlab.com
gitlab.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCsj2.....xxxxxxASUEMaieWVNTRCtJ4S8H+9
|
I'm getting a kind of similar but different error:
Apparently it doesn't know how to auth? 🤔 Normally I use a running |
I hit this issue with 0.8.0 (on OSX from brew) and solved it by removing the brew version and compiling the latest master from source. After that |
I can pull/push my repo from github fine, but I can't push bugs. When I do, I get the following error:
I'm using v0.8.0 on arch linux. I've got all my ssh keys in my knownhosts file.
The text was updated successfully, but these errors were encountered: