Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Remote Account via SSH in macOS - SDNetDomain error 7

I have SSH enabled on our Bitbucket Server, but have been struggling, for over a year with not being able to create a Remote Account, in SourceTree, on my Mac, for it.  I can't remember when it broke in Sourcetree, but I've had several Macs over that time, and the issue is with Sourcetree.

I have created SSH keys, and loaded the Public key into my Bitbucket Server User A/C.  I know they work as the PC Sourcetree app has no problem creating a Remote Account for it.

Whereas, to achieve the same, with the macOS Sourcetree app, I go to Preferences and then Accounts. From there I click 'Add...' and a dialog to add a new remote account appears. I change the host from Bitbucket to Bitbucket Server. Next to Host type, I provide the http(s) URL of our Bitbucket Server . The Auth Type cannot be changed from Basic. In the Username field I add my UserID. The Protocol is kept as SSH, and for the SSH Key it has found and selected my own, that I have also loaded into Keychain Access previously (via 'ssh-add -K ~/.ssh/id_rsa').

When I click Save, it comes up with an Authentication dialog, saying Login required for the Bitbucket Server, with my username pre-populated and uneditable, and a password field. Before I can type in my Password, another modal dialog pops up in front of it, saying:
"Login error
Login failed for your Bitbucket server account.
The remote service said: 'The operation couldn't be completed. (SDNetDomain error 7.)'"

All you can do is accept the error.  It has obviously not been able to connect and hence the repositories available to me are not listed.  You can then go back to enter your password, in the previous dialog, but this does not achieve anything.  The Remote Account is still defined within SourceTree, but if you ask it to refresh itself, then you get the same error again!

What I have just found out, is that if you edit it, change the Protocol back to HTTPS and save it, it will complete by attempting to connect, and simply brings up the Username/Password Login dialog.  There is no accompanying error, so you can enter your password, and if it is correct, it will list your repositories and add an Application Password, into KeyChain Access, for the Bitbucket Server host and your UserID (i.e., called host Access Key for UserID and it will be found under Passwords in the login category).  This does assume that your Bitbucket Server has HTTP(S) SCM hosting enabled as well.  this will mean though that if you clone any repositories, it will be done via the http(s) Source URL!

Though the important part is that it has allowed you to create an Application Password in KeyChain Access.  This is what I believe it was also trying to do, when the Protocol was SSH, but because it was also trying to access the SSH Keys at the same time, or prematurely, it would get the error.

So, finally, if you edit the Remote Account again, and change the Protocol back to SSH, it will now start to work, will list your repositories and allow you to clone them via the SSH Source URL.

It seems to be working for me, and I hope it helps others with the same problem.

4 answers

0 votes
Manju Atlassian Team Mar 14, 2018

In order to create a remote repository from Sourcetree, we need the https password to execute REST APIs. Hence, it isn't possible to do so with ssh since there is no password available to authenticate the user on Bitbucket server with a REST call. 

This works with https. However, we are working to get this fixed in an upcoming release. Thanks for your patience.

Sourcetree Mac Developer

Thank you for confirming that it is an issue.

What is the Jira Issue number for this bug?

Looks like I spoke too soon.  Another day, and it's playing up again, and I can't get it working no matter what I try :-(

Which included:

  • Clearing out the ~/Library/Application Support/Sourcetreee folder
  • Clearing out the ~/Library/Logs/Sourcetree folder
  • Removing the Application Password from KeyChain Access

I also cleared everything down, and tried both the Beta and Latest builds from:

Unfortunately, they don't work either.

Hopefully your fix comes soon, as it's been hanging around as an issue for a couple of years now.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published 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...

3,396 views 4 5
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you