Error: Host Key Verification Failed [How to Solve]

Delete the previous GitHub account information (including the deletion of the file under. SSH and the modification of user, name and user.email), reuse the new GitHub account to generate the public-private key, and then configure it into the settings of the new GitHub account. After that, an error is reported in the GIT clone project. Git error: host key verification failed

Solution:
Open git bash

Enter the following commands in sequence to solve the problem

mkdir -p ~/.ssh
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
ssh-keygen -t rsa -C "user.email"

Reference: stackoverflow

Read More: