{"thread":{"id":"60791","subject":"Slightly embarassing bug in error message when RSA key doesn't match.","startedAt":"2024-01-25T16:37:27Z","lastAt":"2024-01-25T18:12:19Z","messageCount":2,"participants":["Peter da Silva","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"487368","messageId":"CAMbH6s90tNo1Kz3xuv741LoUkN=Y3Bcw2=7yGQhEe=xrgBgQcw@mail.gmail.com","threadId":"60791","inReplyTo":null,"subject":"Slightly embarassing bug in error message when RSA key doesn't match.","fromName":"Peter da Silva","fromEmail":"resuna@gmail.com","sentAt":"2024-01-25T16:37:15Z","receivedAt":"2024-01-25T16:37:27Z","isPatch":false,"sender":{"key":"resuna@gmail.com","avatar":null},"body":"git version 2.20.1\n\nI just went to clone a repo on github on a dev server that I hadn't\nused since March 1 2023.\n\nGithub updated their RSA key on March 24th.\n\nSo I got this message.\n\nWarning: the ECDSA host key for 'github.com' differs from the key for\nthe IP address '140.82.113.3'\nOffending key for IP in /[...]/.ssh/known_hosts:8\nMatching host key in /[...]/.ssh/known_hosts:18\n\nOf course it was the RSA key that had changed, and known_hosts:8 was\nan RSA key, but the error said the ECDSA key was wrong. After removing\nthe bogus RSA key from the file it worked fine with the matching ECDSA\nkey. This error should probably report the correct type for the key\nthat is wrong rather than the key it’s trying to use. :)\n"},{"id":"487374","messageId":"20240125181218.GB54488@coredump.intra.peff.net","threadId":"60791","inReplyTo":"CAMbH6s90tNo1Kz3xuv741LoUkN=Y3Bcw2=7yGQhEe=xrgBgQcw@mail.gmail.com","subject":"Re: Slightly embarassing bug in error message when RSA key doesn't match.","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2024-01-25T18:12:18Z","receivedAt":"2024-01-25T18:12:19Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Jan 25, 2024 at 10:37:15AM -0600, Peter da Silva wrote:\n\n> Warning: the ECDSA host key for 'github.com' differs from the key for\n> the IP address '140.82.113.3'\n> Offending key for IP in /[...]/.ssh/known_hosts:8\n> Matching host key in /[...]/.ssh/known_hosts:18\n> \n> Of course it was the RSA key that had changed, and known_hosts:8 was\n> an RSA key, but the error said the ECDSA key was wrong. After removing\n> the bogus RSA key from the file it worked fine with the matching ECDSA\n> key. This error should probably report the correct type for the key\n> that is wrong rather than the key it’s trying to use. :)\n\nThis comes from your ssh client, not Git itself (of course Git is\ncalling the ssh client under the hood, but we can't fix their messages).\n\n-Peff\n"}]}