Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 386
davids Avatar asked Apr 18 '12 22:04

davids


2 Answers

That happened when reinstall my system. After I deployed the tortoisGit, it showed me the tips when I used 'Git pull' or other code. erro tips

Then I searched this issue, but it did not resole my problem. Fortunately, I recognised that whether it was the problem of the old configuration? So, I opened the 'config' file of my project, deleted the 'puttykeyfile' line.

...!

Resolved!

Hoping to help you!

ps: project dictionary -> .git -> config -> puttykeyfile

like image 185
baoshan Avatar answered Oct 23 '22 17:10

baoshan


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

like image 39
Jupaol Avatar answered Oct 23 '22 18:10

Jupaol