How do I prevent a "No supported authentication methods available" error when using TortoiseHg?

Clocked it. I needed to create an ssh-key pair. To do this I opened puttygen.exe and generated a key. Then I run pageant.exe and added the generated key to its list. The final stage was to log in to codebasehq and add the text of the key (from the box in puttygen labelled 'Public key for pasting...') to my profile.

Hope this helps someone.

(I'm going to accept my own answer but if someone can come up with a more concise answer I'll happily accept yours instead)


I just had the same error message. But in my case, the problem was an outdated Pageant version that came with TortoiseHg.

A great trick to debug the "No supported authentication methods available" error message is to add -v in mercurial.ini

\# Generated by TortoiseHg settings dialog
[ui]
username = name <[email protected]>
ssh = "TortoisePlink.exe" -ssh -2 -batch -C -v

Output:

remote: Pageant is running. Requesting keys.
remote: Failed to get reply from Pageant
remote: Using username "hg".
remote: Disconnected: No supported authentication methods available (server sent: publickey)
no suitable response from remote hg

Also see:

http://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Mercurial

http://confluence.atlassian.com/display/BITBUCKET/Troubleshooting+SSH+Issues


I had the same problem. I use Git Extensions on windows. My solution was a little different tough. Instead of using the ssh repo, I used the http URL.

Something Like: https://{user}@bitbucket.org/{owner}/{name}.git