Problem accessing GitHub

73 views
Skip to first unread message

Igor Korot

unread,
Mar 25, 2023, 12:11:50 PM3/25/23
to git-for-windows
Hi, ALL,
I am getting the error about the key change when tried to acces GitHub.

Googling revealed this:
https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/

When I tried to run the very first command suggested:

[code]
Igors-MacBook-Air:dbhandler igorkorot$ ssh-keygen -R github.com
Host github.com not found in /Users/igorkorot/.ssh/known_hosts
Igors-MacBook-Air:dbhandler igorkorot$
[/code]

I can probably continue to fix the error, but I'd like to understand
why I don't have the entry in the file in question.

Did I do something wrong when I set it up?

Thank you.

Igor Korot

unread,
Mar 25, 2023, 12:29:29 PM3/25/23
to git-for-windows
Hi,
I also had this:

Igors-MacBook-Air:dbhandler igorkorot$ ssh-keygen -R github.com
Host github.com not found in /Users/igorkorot/.ssh/known_hosts
Igors-MacBook-Air:dbhandler igorkorot$ vi ~/.ssh/known_hosts

Thank you.

Igor Korot

unread,
Mar 25, 2023, 12:33:49 PM3/25/23
to git-for-windows
Hi,
Upon receiving the known-hosts file, I see an entry that starts with:

[code]
[ssh.github.com]:443,[140.82.113.36]:443
[/code]

Was there a typo in the instructions on how to fix the error?

Thank you.

Igor Korot

unread,
Mar 25, 2023, 12:43:25 PM3/25/23
to git-for-windows
Just for the reference - here is the steps I followed to set everything up:

[code]

Open a command prompt (that has git in the path)

Generate an ssh key

ssh-keygen

press <enter> a bunch of times.

Now you have a private key. You just leave it alone.

Copy the public key to your clipboard

clip < "%USERPROFILE%\.ssh\id_rsa.pub"

Ref: clip.exe

If clip doesn’t work:

Open the file in notepad:
start "" notepad "%USERPROFILE%\.ssh\id_rsa.pub"
<ctrl>-a (Select all)
<ctrl>-c (Copy)

Visit https://github.com/settings/ssh/new

Paste the public key into the key field

Enter the name of the computer (Windows 8.1) into the title.

Click Add SSH Key

[/code]

And I did that for all 3 major platforms (Windows, Linux, Mac).

Thank you.

P.S.: Sorry for sending so many e-mails. I am just trying to give as
much info as possible and
sometimes its hard to compile it from different sources...

Igor Korot

unread,
Mar 26, 2023, 5:17:38 PM3/26/23
to git-for-windows
Finallly if I comment out the first line in the known_hosts file
then I get the following output:

[code]
C:\Users\Igor\OneDrive\Documents\dbhandler_app [master ↑2 +8 ~2 -0 !]> git push
The authenticity of host '[ssh.github.com]:443 ([140.82.114.35]:443)'
can't be established.
ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[ssh.github.com]:443' (ECDSA) to the list
of known hosts.
Warning: the ECDSA host key for '[ssh.github.com]:443' differs from
the key for the IP address '[140.82.114.35]:443'
Offending key for IP in /c/Users/Igor/.ssh/known_hosts:6
Are you sure you want to continue connecting (yes/no)? yes
[/code]

presume everything should be OK from now on.

Unless GitHub decides to change the key again... ;-)

Thank you.
Reply all
Reply to author
Forward
0 new messages