SourceTree on Windows keeps showing "authentication via ssh keys failed"

I am using the latest Version of SourceTree on Windows. 

- At PuTTY Key Generator dialog box, I click Load button to load my Git SSH key -> Save private Key.

- I then do right-click on Pageant on system tray to Add key. It was successfully added. 

After that I can work with sourceTree, like pull, push, etc.

But when ever I restart SourceTree, the SSH keys seems lost, and I have to repeat this process again. 

Is there anyway to add a SSH key permanently? Thanks

1 answer

0 votes

Hi Louis, do you have any keys loaded in your agent when you reboot your computer? You can check that using the command  

ssh-add -l

You can also try pushing or pulling using the command line right when you restart your computer and see if you get the same error. In that case the error won't be with Sourcetree btu with the SSH keys not being properly stored in your pc.

Let us know!


Hi Ana, thanks for our reply. To answer your question: no, unfortunately, everytime I reboot my computer and SourceTree, there is no keys loaded in Pageant, even though it was there before.

The thing is, I still can pull, push, and everything with Git Bash. That means, SSH Keys is stored properly in my PC, isn't it. 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,101 views 4 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you