# TortoiseGit disconnected: No supported authentication methods available (server sent: publickey)

*2016-05-13*

> Fix TortoiseGit’s publickey authentication error by converting an SSH private key to PPK format with PuTTYgen and loading it into Pageant.

After [switching to SSH authentication](https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html) for my Bitbucket repository, the [TortoiseGit](https://tortoisegit.org/) Windows client stopped working.

I could no longer pull, push, or perform other operations that connected to the remote repository. Android Studio, the other IDEs and tools I used daily, and the Git command line client still worked properly.

![TortoiseGit authentication error](/blog/tortoise_git_auth_error.png)

My TortoiseGit setup used **Pageant**, part of the [PuTTY](https://www.chiark.greenend.org.uk/~sgtatham/putty/) toolset, to manage SSH authentication keys. Since I'd already generated a public/private key pair with [`ssh-keygen`](https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html), I needed to convert the private key to PuTTY's format and load it into Pageant.

To do this, I used **PuTTYgen**, another tool in the PuTTY suite.

Load the private key in PuTTYgen. If it is protected by a passphrase, you'll be prompted to enter it. Leave the default settings unchanged.

![PuTTYgen](/blog/putty_key_gen.png)

![Private key passphrase prompt](/blog/putty_key_gen_pass.png)

If the import succeeds, PuTTYgen displays a confirmation message:

![Key import confirmation](/blog/putty_key_gen_success.png)

Next, click **Save private key** and save the key in PuTTY's `.ppk` format. Start **Pageant** and load the converted private key:

![Pageant](/blog/pagent_key_list.png)

You should now be able to pull, push, and perform other operations that connect to the remote repository.

![TortoiseGit after loading the key](/blog/tortoise_git_command_progress.png)

**Note:** Start Pageant and load your key before using TortoiseGit. Otherwise, you may see the same error again.

