user9004433
user9004433

Reputation: 53

Disconnected: No supported authentication methods available (server sent publickey)

I received a new laptop a month ago, configured Git and TortoiseGit, and things were working fine. Until I had to reboot the laptop. I put it to sleep, but some Windows updates required a restart.

After the restart, pull using TortoiseGit throws message in the subject.

Windows 7 + TortoiseGit 2.5

My Git Bash works fine. I can clone, pull, push. No issues.

Reading Disconnected : No supported authentication methods available (server sent :publickey), I've tried many things, including creating .profile, adding keys in Pageant.

I tried to change C:\Program Files\TortoiseGit\bin\TortoiseGitPlink.exe to ssh.exe but TortoiseGit doesn't allow me to do that. Config field is enabled, and I can type in there, but neither OK nor Apply consume this change. I have gone as far as uninstall and installed on TortoiseGit 2.5 - still no luck.

In my environment, Putty keys are placed on a network drive. I was told to reboot in case there were issues there. I see my network drives just fine, and I have rebooted several times - just in case.

Again, my Git Bash is still working just fine.

Any other things to consider?

Upvotes: 5

Views: 8795

Answers (5)

crossmediapool
crossmediapool

Reputation: 3

Since SSH is supported now in Windows 10:

For commandline based git: I had to remove Environment variable: GIT_SSH=c:\Program Files\Putty\plink.exe

Tortoise Git: Settings: Network Settings > C:\Windows\System32\OpenSSH\ssh.exe

Upvotes: 0

AnandMohan
AnandMohan

Reputation: 121

Issue: "Disconnected: No supported authentication methods available (server sent publickey)"

Solution:

  1. Right-click the repo folder -> TortoiseGit-> Settings-> Network

  2. Change the SSH client to C:\Program Files\Git\usr\bin\ssh.exe if you installed the Git

Upvotes: 12

Evgeny
Evgeny

Reputation: 1273

In my case there was a lot different sessions in Putty. I deleted all of them and save as default configured access to git (user@domain_url in sessions, domain_url in connections, path to key in connections\ssh\auth).

Upvotes: 0

JCQian
JCQian

Reputation: 879

I have the same problem with the publickeys. For me, I have Git installed before and the git is running fine, I also generated the public key using the tools came with git and stored the key on server. After last update of the TortoiseGit, my fetch and commit were not working. I found somebody posting an answer as following:

  1. Run the settings from the right-click or from the Start->All programs->TortoiseGit->Settings->Network and change the SSH client to C:\Program Files\Git\usr\bin\ssh.exe if you installed the Git
  2. In Settings->Saved Data, Clear Authentication data, I don't know this is required but I did that.

Upvotes: 0

Siphon
Siphon

Reputation: 1061

This just recently became a problem for me as well. The issue was that the saved session in Putty was not being referenced correctly.

Steps:

1) Open the settings dialog... right-clicking the repo folder >> TortoiseGit >> Settings

2) In the left panel, go to: Git >> Remote

3) In the Remote list, select "origin"

4) Change the URL to SavedSession:GitUsername/GitRepo.git, where SavedSession should be replaced by the saved session name used within putty.

Upvotes: 0

Related Questions