Menu

Showing posts with label Host key is not cached. Show all posts
Showing posts with label Host key is not cached. Show all posts

The server's host key is not cached. You have no guarantee that the server is the computer you think it is.

If you are using ssh to login or recently updated your ssh keys but not updated in your application. Here we will see how we could fix this error in Sourcetree.

Steps to follow in Sourcetree

  1. Go to source tree
  2. Tool >> Options
  3. Update the SSH client and SSH Key
    How to update ssh keys in Sourcetree


  4. Save and retry your action

By updating known_host file

  1. We can find the known_host file at this location.
    • On Windows: The SSH known_hosts file is usually located at C:\Users\<Username>\.ssh\known_hosts.
    • On macOS/Linux: The file is typically located at ~/.ssh/known_hosts
  2. Open the file in edit mode and find the host or IP that you are trying to connect with.
  3. Copy the host key presented by the server and paste it into the known_hosts file, replacing the existing entry or adding a new one if it's not already there.