npm install installs dependencies and reports error Host key verification failed

  1.  Set git identity and email
    git config --global user.name "你的名字"	 	 ====> 用户名
    git config --global user.email “你的邮箱"   ====> 邮箱
    
  2. Enter => User => [your user name] => .s sh folder , delete the known_hosts file and
    you may see the known_hosts_old file after entering, but ignore it, just delete the known_hosts directly, and then start Configure git
  3. $ ssh-keygen -t rsa -C "[email protected]"    
  4. It will appear after executing the previous link. Just press Enter twice.
    Generating public/private rsa key pair.
    Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):
    
  5. Copy the contents of the "id_rsa.pub" file in the user->[your username]->.ssh folder and save it.
    Enter the command in the command line:
    ssh -T [email protected]
    
  6.  

  7. Just enter yes and press Enter, and finally execute it again

  8. npm install 


     

     

     

 

Guess you like

Origin blog.csdn.net/zq18877149886/article/details/132402854