Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get Sourcetree to connect via SSH

Simon Bromberg May 31, 2018

I tried setting up two-factor authentication on my Bitbucket account and it said I needed to configure SSH. So I did but I'm having problems getting it to work with Sourcetree (2.7.4 174 for macOS 10.13.4 17E202, git version 2.15.1 Apple Git-101)

  • I generated a key in Sourcetree using these steps
  • I copied the SSH key to Bitbucket in my online settings
  • I followed SSH troubleshooting instructions here

It seemed to work initially, but when I try to refresh remote repositories in Sourcetree it says: 

screenshot.png

(note with SSH there is no spot for an app password…)

 

And when I try to edit my account authentication settings in Sourcetree and click save, now it always says:

screenshot2.png

 

 Edit:

I just tried switching back to HTTPS, putting in a new app password from Bitbucket, and then saving, then going back to SSH and then so far it seems to work… but that doesn't really make much sense.

1 answer

1 vote
Manju
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 31, 2018

I'm guessing that the first time you saved the account with ssh, the credentials (refresh and auth tokens) were not stored properly in keychain and the encrypted file. But, this time when you did that, it has saved properly. You can verify that by checking if your keychain has two items "Bitbucket Credentials" and "bitbucket.org Access key for <your_user_name>"

Simon Bromberg May 31, 2018

I see the latter only. I don't see anything matching "Bitbucket Credentials" exactly.

Manju
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 31, 2018

I'd recommend removing the account once and adding it back with SSH + OAuth and checking if you get both the keychain items added. That'll ensure everything you need to get this running with OAuth is present. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events