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

search

Old articles of this week

Wdssmq/blog astro: a static blog based on Astro;

Essentially, when faced with a code problem, we need another person who is willing to devote energy to your problem and has the corresponding technical knowledge..

Next, it seems that the replacement of Resilio Sync with Synything is also a slightly larger project.. Orz

GoodSync gave away a one-year license last year, and then it actually used it; I was thinking about changing Synything when it was due, but the last few days I gave a reminder that I spent ¥ 381 to renew Orz for three years. There are still some differences between their positioning and posture.. Earlier, Resilio Sync and BCompare were used, but the former occupied too much memory, and the latter was not automatically synchronized..

2024, let's back up the Duet archive..

... An unknown niche style library+inline style hybrid writing is indeed a bit groovy, but it is absolutely positive that "learning has begun" and can continue..

After reading a lot of questions in the post bar, there is an illusion that many people have registered a post bar specifically to ask a question, and the question itself may or may not be answered effectively (related to the point of question and the specific posture). However, in any case, after that, there will be no more than after cancelling the account, as if you never have to learn the corresponding things..

Devil Doll

-They are studying whether you are a real adult or a child pretending to be an adult

-I've studied it for a long time myself

In Lego DC, (basically the Batman family, the youngest one will become the same no matter who feels the design --

So, just like Sister Xianglin, I need to "sign in" my emotional feelings every day, but there is no need for me to sign in like this

Powergeneration supporter

Latest comments

Friendly Links

  •  Subscribe to RSS 2.0 news aggregation on this site
Call Eastwar