Showing posts with label Sourcetree. Show all posts
Showing posts with label Sourcetree. Show all posts

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

Thursday, August 13, 2015

How to overwriting local changes in GIT using Sourcetree


  1. Open Sourcetree
  2. Open repository 
  3. At the ribbon bar, click Terminal


  4. At the terminal window, type the following commands:

    git fetch --all
    git reset --hard {remote branch} (example: origin/master)
    git pull origin master