libgit2 / rugged

ruby bindings to libgit2
MIT License
2.25k stars 277 forks source link

invalid or unknown remote ssh hostkey when connecting to Github.com #960

Closed radar closed 1 year ago

radar commented 1 year ago

I suspect this has something to do with GitHub changing their SSH key recently.

Steps to reproduce:

repo = Rugged::Repository.new(".")
repo.fetch("origin")

I can however run git clone git@github.com:radar/twist-v2 and other operations while running as the same user as the Ruby app.

And I can also:

ssh git@github.com
PTY allocation request failed on channel 0
Hi radar! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.

Is there some secret known_hosts here that Rugged is referencing? What command am I missing here?

radar commented 1 year ago

I updated my machine's version of Ubuntu from 18.04 -> 22.04 and this issue went away.