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
- Go to source tree
- Tool >> Options
- Update the SSH client and SSH Key
- Save and retry your action
By updating known_host file
- 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
- Open the file in edit mode and find the host or IP that you are trying to connect with.
- 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.