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

Solved.

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 Join to answer
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 ...

256 views 0 3
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot