VSCode Notes Git: Host key verification failed

Pitching/feedback/suggestions: My salted fish heart    Aigeng - @ wdssmq

Always use TortoiseGit This tool is used to operate Git. However, when VSCode has built-in support, it is not beautiful to switch windows..

Today, I finally tried to submit and push with VSCode for the first time, but an error message was reported:

Git: Host key verification failed

It may be in this form

Warning: Permanently added 'github.com,192.30.255.113' (RSA) to the list of known hosts.

resolvent:

Execute the following command

 ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts

Source:

ssh - Git error: 'Host Key Verification Failed' when connecting to remote repository - Stack Overflow


Failed to authenticate git remote

perhaps

Permission denied (publickey).

SSH authentication is recommended.

1. Change the remote address to [email protected] :wdssmq/HelloZBlog.git The form of;

2. Open Git Bash to execute:

 cd ~/.ssh ssh-keygen -t ecdsa #List the path of the. ssh folder pwd #C/Users/username/. ssh

3. Found in the corresponding path id_ecdsa.pub , use the editor to open, copy and add the content to the GitHub account.

Click the link to add directly:

Add new SSH keys: https://github.com/settings/ssh/new

Then submit in VSCode;


ERROR: You're using an RSA key with SHA-1, which is no longer allowed. Please use a newer client or a different key type

solve:

RSA algorithm is considered no longer secure (mainly depending on the key length);

The more direct way is to change the algorithm to ecdsa or ed25519, which is safer. Of course, if your environment is older unknown key type ed25519 If you are prompted by, choose the former;

 ssh-keygen -t ed25519 # unknown key type ed25519 ssh-keygen -t ecdsa

kex_exchange_identification: Connection closed by remote host

explain:

In my case, it is a network problem. For the connection problem of github, the first suggestion is to configure the host file. See this project: 521xueweihan/GitHub520

I encountered this problem because the proxy was set in the SSH configuration, and then the proxy failed. Theoretically, it would be OK to change a node, but the host was configured in the front, and then it was changed to direct connection;

 Host github.com User git # ProxyCommand "C:\Program Files\Git\mingw64\bin\connect.exe" -S 127.0.0.1:10808 %h %p

relevant:

Notes msysGit installation and use

[VSCode] shortcut key memo

ctrl + shift + g You can switch to Git management.

[Triumph] VSCode Remote Development Configuration


 Love generating electricity

Title:《 VSCode Notes Git: Host key verification failed 》Author: Ice sinking and floating water
Original link: https://www.wdssmq.com/post/20201216004.html
Unless otherwise specified, it is original. Please specify if it is reproduced.

Share to WeChat

Scan QR code

You can view or share with your friends on WeChat.

Related articles

Comment:

◎ Welcome to participate in the discussion. Please express your views and exchange your views here.

Site classification

  •  Subscribe to RSS 2.0 news aggregation on this site

search

Old articles of this week

"Ninja and Killer" - birth is a fact, on this basis, I feel better than "Deer Naizi"; One is not a human being (nor a deer), while the other is not a human being (nor a deer). The abstract deer is higher, but it is not beautiful..

None of the four ports of the Nuc can be recognized by the hard disk, and the light is on.. Finally, try not to stick it in the end..

Green Link's hard disk box.. The other Lenovo has no problem..

Recent movie records: Super Mario, Death Attendant and Wolverine..

The move has also come to an end. Although the moved things have to be put back, the new wardrobe has been separated for two months, but I still don't want to put clothes in it.

How about I summarize and sort it out once a year?? Broken rain collection_set ice and floating water _ Page 1

Therefore, without this message, only 13 beeps will be sent in 2024????

When the git operation in VSCode is stuck, it's always a pain point that you can't cancel it on your own initiative. Generally, it's push or pull. Today, even submission is stuck..

Another summer passed, so I didn't buy waterproof shoe covers this year; Then it was cold. I bought a sleeping bag in order to kick the quilt. I don't know if it would be slightly narrow at 1.2 meters..

Cleo at 5:00 to 7:00, added to the list in June 2018, and found it online at station B at the end of November 21. It was watched twice until the last few days.. The next five items are from 2019, all of which are movies - slightly longer to-do lists..

Useful programs automatically grab their own beeps with tags, and then delete them from the online after annual backup; I just found that last year's data was backed up but not deleted online?? Compared with the local data, there is still one online data, Why??

Latest comments

Friendly Links