When executing npm install, an error message appears: Host key verification failed.

1. Error reporting problem:
Insert image description here
2. Solution

1. If you don’t have an email, you need to set your identity name and email in git.

git config --global user.name "yourname"	 	 ====> 用户名
git config --global user.email“your@email.com"   ====> 邮箱

2. If you have an email address, enter the email address you just set in git.

ssh-keygen -t rsa -C "[email protected]"

3. After executing the previous step, there will be two pauses. Just press Enter twice and the following picture will appear a>

Insert image description here
4. Enter the command in the command line:

ssh -T git@github.com

5. When the following code appears, enter yes and press Enter
Insert image description here
6. After entering npm install, the following problem appears:
Insert image description here
7. Enter the command in the command line:

git config --global url."https://".insteadOf git://

Enter:

npm install
npm install --registry=https://registry.npm.taobao.org 

Problem solved! ! !
Insert image description here
ps: If the installation is still interrupted, please use the mobile phone hotspot to access the computer WiFi!

Guess you like

Origin blog.csdn.net/Amily8512/article/details/131766100
Recommended