Git error: “Host Key Verification Failed” when connecting to remote repository


I am trying to connect to a remote Git repository that resides on my web server and clone it to my machine.

I am using the following format for my command:

git clone ssh://

This has worked fine for most of my team members. Usually after running this command Git will prompt for the user's password, and then run the cloning. However, when running on one of my machines I get the following error:

Host key verification failed.

fatal: Could not read from remote

We are not using SSH keys to connect to this repository, so I'm not sure why Git is checking for one on this particular machine.

Best Solution

As I answered previously in Cloning git repo causes error - Host key verification failed. fatal: The remote end hung up unexpectedly, add GitHub to the list of known hosts:

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