Search code examples
gittortoisegit

pull failed by GUI TortoiseGit , however successfully by Git Bash


I got the following error when using TortoiseGit, however I can run git pull successfully by the Git Bash with the command " git.exe pull --progress --no-rebase -v "origin"", what's should I config for TortoiseGit?

enter image description here


Solution

  • Git bash looks for an ssh private key in %HOME%\.ssh (with HOME being set by the git bash to %USERPROFILE%)

    But for TortoiseGit, you need to specify that same private key in the settings (Git/Remote)
    And/Or it uses putty: see " Tips and tricks for SSH/PuTTY"

    Start PuTTY, go to Connection->SSH->Auth and select your key

    In order for TortoiseGit to use ssh instead of putty, as the OP Jason comments, you need to specify ssh.exe in the network settings.
    That is true especially if you have generated ssh keys with openssh (id_rsa/id_rsa.pub), and not with puttygen (mykey.ppk).

    http://guganeshan.com/blog/wp-content/uploads/2013/09/Change-SSH-client-in-Network-options-of-TortoiseGit-Settings.png

    (Image from blog post "Setting up Git and TortoiseGit with Bitbucket, step by step" by Guganeshan.T)