TortoiseGit 1.7.8: "Couldn't load this key" on "sync" or "pull"?

davids picture davids · Apr 19, 2012 · Viewed 14.8k times · Source

When I try to use "Git Sync" and then "Pull" I get the error:

Couldn't load this key (unable to open file)

It then tries to proceed with the pull and I get this error:

Disconnected: No supported authentication methods available (server sent: public key)

This has happened only since I upgraded to 1.7.8.0. It was all working just fine before. I can successefully pull using gitbash so I know I can connect.

I am not sure what changed, or what I can do to fix it. Please help!

ADDITIONAL STEPS

I went to the the GIT folder and used gitbash to check git remote -v and received:
.puttykeyfile
origin [email protected]:{name}/{repository}.git (fetch)
origin [email protected]:{name}/{repository}.git (push)

I think that is correct.

I checked the putty key settings in tortoisegit. I have two entries:

  1. .puttykeyfile - which just has .puttykeyfile in Remote
  2. origin - this appears to have all the correct information in Remote, URL and Putty Key

When I load the key in PuTTYGen it has the ssh-rsa 1024... key fingerprint.

pageant.exe was running, but isn't now, but it still doesn't work

When it was working before, I had on git folder in the same folder as my key. Now I have 3, but none of them work and it doesn't seem to work if I create a new git folder with a single repository and key. I don't know if it affects the results, but wanted to share that just in case.

Answer

Jupaol picture Jupaol · Apr 19, 2012

That happens when you can not authenticate to the remote server, for some reason your keys are not found. You installed a new version of tortoiseGit. Were your keys inside that folder? maybe they were removed when you installed the new version.

Check the remotes are configured in your Git repository

git remote -v

If they are correct, and you still have your keys, try to add them again to the tortoise settings

TortoiseGit Settings - Git - Remote - Putty key

If you need help to convert your rsa keys (used to authenticate with) to putty format:

http://www.electrictoolbox.com/putty-rsa-dsa-keys/

Also check that pageant.exe is not running (you can check that in the systry), it could be causing problems if the loaded key is not found