I have here a particular problem that may be a client issue. However, I am getting a server error. So please read through, maybe you will agree with me that this is a really weird problem and hopefully you will help me resolve it!:)
Here is my situation:
I got a setup at home with Git and Gitolite server working with key authentifications. My private key and public key were validated and working properly until last week. Now on my client computer #1 it is impossible for me to push/pull any refs from my Git server.
I have tried the same key with the exact same repository (mounted on same drive) but with my laptop, and my server will accept the key...
I tried to uninstall / reinstall Git, generate other key-pairs, rechecking my SSH configs, restarting my server services, but nothing works. When I check my SSH logs on DEBUG mode, I barely get any details about the error:
Jul 28 06:46:28 git-server sshd[5100]: debug1: Forked child 19124.
Jul 28 06:46:28 git-server sshd[19124]: Set /proc/self/oom_adj to 0
Jul 28 06:46:28 git-server sshd[19124]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8
Jul 28 06:46:28 git-server sshd[19124]: debug1: inetd sockets after dupping: 3, 3
Jul 28 06:46:28 git-server sshd[19124]: Connection from xx.xx.xx.xx port 53847
Jul 28 06:46:28 git-server sshd[19124]: debug1: Client protocol version 2.0; client software version PuTTY_Local:_Jun__3_2012_14:48:17
Jul 28 06:46:28 git-server sshd[19124]: debug1: no match: PuTTY_Local:_Jun__3_2012_14:48:17
Jul 28 06:46:28 git-server sshd[19124]: debug1: Enabling compatibility mode for protocol 2.0
Jul 28 06:46:28 git-server sshd[19124]: debug1: Local version string SSH-2.0-OpenSSH_5.5p1 Debian-6+squeeze1
Jul 28 06:46:28 git-server sshd[1002]: debug1: server_input_channel_req: channel 0 request winadj@putty.projects.tartarus.org reply 1
Jul 28 06:46:28 git-server sshd[1002]: debug1: session_by_channel: session 0 channel 0
Jul 28 06:46:28 git-server sshd[1002]: debug1: session_input_channel_req: session 0 req winadj@putty.projects.tartarus.org
Jul 28 06:46:29 git-server sshd[19124]: debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-1024
Jul 28 06:46:29 git-server sshd[19124]: debug1: Checking blacklist file /etc/ssh/blacklist.RSA-1024
Jul 28 06:46:29 git-server sshd[19124]: debug1: temporarily_use_uid: 1001/1001 (e=0/0)
Jul 28 06:46:29 git-server sshd[19124]: debug1: trying public key file /home/gitolite/.ssh/authorized_keys
Jul 28 06:46:29 git-server sshd[19124]: debug1: fd 4 clearing O_NONBLOCK
Jul 28 06:46:29 git-server sshd[19124]: debug1: restore_uid: 0/0
Jul 28 06:46:29 git-server sshd[19124]: debug1: temporarily_use_uid: 1001/1001 (e=0/0)
Jul 28 06:46:29 git-server sshd[19124]: debug1: trying public key file /home/gitolite/.ssh/authorized_keys
Jul 28 06:46:29 git-server sshd[19124]: debug1: fd 4 clearing O_NONBLOCK
Jul 28 06:46:29 git-server sshd[19124]: debug1: restore_uid: 0/0
**Jul 28 06:46:29 git-server sshd[19124]: Failed publickey for gitolite from xx.xx.xx.xx port 53847 ssh2**
Jul 28 06:46:29 git-server sshd[19124]: debug1: do_cleanup
Now I am thinking that my server works well because I have tested my Putty key in two other client locations and everything works just fine. Maybe it is my workstation that has trouble with sending my Putty key. In case it is a client problem here are my pc specs:
Thank you in advance!
After all this time; problem solved!
Apparently it’s a Putty issue with the Registries that confuses the ToirtoiseGit windows client. I'm surprise how this case is not documented anywhere. Thanks for my friend who found the solution.
So on Windows, all the sessions information and the Putty settings are located here
HKEY_CURRENT_USER\Software\SimonTatham\PuTTY
By deleting the “Sessions” and the “SshHostKeys” folders, which are automatically re-generated after, have solved the problem. But we didn’t know why.
More digging leads us to the conclusion that when the default settings are altered via the putty interface, it causes Plink (the putty agent for the ToirtoiseGit), to stick to the default settings of Putty instead of focusing on the “auto-loaded putty key” setting.
The bottom line is
HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default Settings
I hope that this solutions will help others also ! :)