SourceTree 2.4 failing to use ssh OpenSSH public key with GitLab repo on OSX El Capitan, prompting for git user password.

Title says it all. No changes on my end except SourceTree updated yesterday. MacPorts installed command line git works fine with same repo.

Where can I specify which key to use, SourceTree is not picking it up from my environment. 

1 answer


I'm short on the hows and whats but the why was my OpenSSH identity had been removed from my keychain, I can't say with 100% certainty but I believe and evidence suggests this was related to an OSX update that installed while I was logged in.

The reason it kept working in the Git CLI was, that it wasn't - I was getting prompted for my passphrase when pushing/pulling and didn't think about it being out of the ordinary since I'm used to that in my Linux terminals.

For anyone encountering this, add your OpenSSH private key to your keychain by opening a terminal and entering the following.

ssh-add -k [path_to_private_key]

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

798 views 0 4
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