failed to clone repository: ssh: handshake failed: knownhosts: key mismatch #2114
-
This isn't the same as the GitHub key rotation issues, I swear. I have a Git server running on a NAS device that I would like to use for flux as I don't want my infra up on Github while I'm experimenting with Flux. When trying to bootstrap (after installing with
But I can SSH in to the device just fine. I did a bit of research that go-git might not support ssh-ed25519 so I even forced it to be ssh-rsa and it still doesn't working. This host is currently the only one in my
Am I missing something? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 10 replies
-
@slyons did you ever resolve this, i am having the same issue. many thanks |
Beta Was this translation helpful? Give feedback.
-
I was reading very quickly and almost accused you of being a duplicate of this issue: #2097 (comment) Fortunately you pointed out in the very first line that you are not. However, this may be a good search result landing place for people who did have that issue, so I might as well drop the link here anyway. (Link above: GitHub has updated their SSH keys. You may need to take action.) Did you ever resolve this? You should be able to create Flux keys interactively with https://fluxcd.io/docs/cmd/flux_create_secret_git/ I use It seems unlikely that the host has more than one SSH key unless it also has, besides a git server, an actual SSH server. Next question: if there are maybe indeed multiple SSH servers, are you certain that there is no custom port number expected in your gitrepository? |
Beta Was this translation helpful? Give feedback.
-
So the only way I was able to resolve it was to use a private Github repo
as opposed to my own Git server, so something clearly broke between trying
to resolve the server name (despite using an IP address).
…On Thu, Jan 27, 2022 at 11:19 AM Kingdon Barrett ***@***.***> wrote:
I was reading very quickly and almost accused you of being a duplicate of
this issue: #2097 (comment)
<#2097 (comment)>
Fortunately you pointed out in the very first line that you are not.
However, this may be a good search result landing place for people who did
have that issue, so I might as well drop the link here anyway.
Did you ever resolve this? You should be able to create Flux keys
interactively with flux create secret and they are populated with a
known_hosts automatically. This results in a similar outcome to flux
bootstrap but has less going on so might be a bit more precise tool for
debugging your issue.
https://fluxcd.io/docs/cmd/flux_create_secret_git/
I use flux create secret git along with flux create source git and add
the secretRef manually.
It seems unlikely that the host has more than one SSH key unless it also
has, besides a git server, an actual SSH server. Next question: if there
are maybe indeed multiple SSH servers, are you certain that there is no
custom port number expected in your gitrepository?
—
Reply to this email directly, view it on GitHub
<#2114 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAKDO52OOU4MXVYGAOWJGLUYGLF7ANCNFSM5ISHDLBQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I'm also unable to bootstrap on a non-github/gitlab/bitbucket gitrepository (in my case gitea). I've already tried Trying to immediately use
I've also tried to add the full results of Next step would probably to bootstrap using github and then migrate away from github using those manual commands? First time trying flux, here. |
Beta Was this translation helpful? Give feedback.
-
I think this may be an issue with the Generic Git Server implementation. I'm not sure exactly what solved my issue, but I had similar ssh errors. Two things that helped:
Hope this helps someone out there :) |
Beta Was this translation helpful? Give feedback.
-
I had the same problem, but just running the What did solve the problem is actually a funny bug:
So maybe this will help someone in the future:
|
Beta Was this translation helpful? Give feedback.
I had the same problem, but just running the
flux bootstrap git ...
with the--private-key-file
option didnt solve it for me.What did solve the problem is actually a funny bug:
.ssh/known_hosts
was made by my ssh client theflux bootsrap
failed.git clone <repo>
then the command worked again.So maybe this will help someone in the future:
.ssh/known_hosts
filegit pull <repo>
somewhere and accept theAre you sure you want to continue connecting (yes/no/[fingerprint])?
flux bootstrap git ...
should work again