Friday, December 25, 2015

How to fix The server's host key is not cached in the registry. You have no guarantee that the server is the computer you think it is when Fetch/Pull/Push in SourceTree

Issue when you click Show Full Output

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 ...
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without

adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.

Fix

  1. Open command prompt and type:
    "C:\Program Files (x86)\ Atlassian\SourceTree\tools\putty\plink.exe" {server} 
  2. Accept to store key in cache
  3. Type the username to connect to the server
  4. Type the password
  5. Close command prompt
  6. Try to Fetch/Pull/Push again
{server} is where the GIT server is located

Example:

"C:\Program Files (x86)\ Atlassian\SourceTree\tools\putty\plink.exe" www.blogger.com

Source: http://stackoverflow.com/questions/32437659/cannot-pull-git-remote-repository-from-sourcetree

2 comments:

  1. Hello it tells me access denied.

    | Ubuntu 18.04.3 LTS
    -- End of banner message from server -----------------------------------------
    Access denied

    ReplyDelete
  2. Just an FYI that this method still works for Windows 11 and I was stuck with the same error in Sourcetree. Thanks!

    ReplyDelete