SourceTree cannot connect to BitBucket cloud - SDNetDomain error 7.

All of a sudden SourceTree Mac app could not retrieve my remote repositories but throwing error instead:

Login failed for your Bitbucket account.

The remote service said: 'The operation couldn’t be completed. (SDNetDomain error 7.)

I changed the password several times, updated the account, I even switched to Atlassian account (which I now cannot revert), tried SSH instead of HTTPS, all to no avail. 

I've seen this question asked several times but with no answers. 

Guys, what is going on? We cannot get our work done!


PS: I received several emails from BitBucket in the past few weeks stating that my account has been compromised so I changed the password several times but none of them works for SourceTree although I can succesfully login through the web app.

8 answers

I fixed this issue by creating a new App Password.

I have activated Two-step verification ago. This may cause the issue.

You can create a App password by;

  1. Go to Bitbucket Settings
  2. Select Access Management >> App Passwords
  3. Create a new password by click on Create New Password
  4. Copy the password and give it for Sourcetree instead of your Bitbucket password.


I tried that but it didn't work for me. 


This worked for me the second time around. Had to quit SourceTree and start it up again but once I put in my username and generated password, (on a Mac) it asked for my keychain access for my Bitbucket account and seemed to connect fine to my remote repos.

SourceTree stopped working suddenly. I had merged Atlassian and BitBucket account and that worked for weeks and then suddenly stopped working. 

This solution worked for me. Thanks! 

Thanks, works like a charm.

After created App Password, on a Mac, I opened Sourcetree, clicked at setting icon, settings, remove account listed and add your account again.


Only worked for me after I edited my "Bitbucket Cloud" account in my remote repositories setting in SourceTree. I didn't delete it but just used the "edit account" button and updated the password.

Before doing this you must create an "App Password" on Bitbucket.

SOLVED: @Air Apps method worked for me

Ye worked for me too, but it took a few minutes for the app password to kick in, and failed the first couple of tries.

I still don't know why authentication isn't working through SourceTree in these specific cases, but I did find a workaround. If you add the the remote via the command line it will work in SourceTree. This article is a simple overview of adding a remote that way if you're not familiar with it (it's a GitHub article but not GitHub-specific).

Here are the steps I followed (and this assume you already have public key authentication set up with your Git host):

  1. Delete the existing remote link, either via SourceTree or the CLI (assumes a remote named 'origin'): 

    git remote rm origin
  2. Add remote via the CLI: 

    git remote add origin
  3. Test to verify: 

    git remote -v

    The remote should be listed.

  4. View the repository in SourceTree. The remote should be listed there (click 'show' in the sidebar).
  5. Try a push or pull. The first time I did a push I was prompted for username/password. Entering the Atlassian credentials did the trick. 

This worked for me with two repositories. Good luck!

Same issue . 

It appears after Atlassian Auth services merge (Bitbucket/Jira). 


Agreed - they haven't migrated our emails properly. 

Apparently, if I use git pull it works if I use the Atlassian account, not the BitBucket acount.

Still, SourceTree cannot connect.

Actually SourceTree does not allow logging in with email address (like Atlassian account) but only with Bitbucket username which cannot be used anymore, apparently. 

Maybe this could be the issue?

I'm having the same issue you are, did you find a solution? This started happening after I switched to an Atlassian account. I've seen the error regarding using an email address, but the username doesn't work, either.

I have got this as well. Never had this issue before. Looks like a bug. 

Can't even browse repos on Bitbucket. 

It looks like they migrated my accout to Atlassian - but the new Atlassian login doesn't work with Bitbucket if you have 2 step authentication enabled. 


What a mess !  !! 

I Disabled 2 step auth, deleted local repo, then cloned it from remote. All is working again smile

This didn't work for me - I still get the above error 

1 vote

In SourceTree simply opened Settings and changed the protocol from Https to ssh and it works without any account and password change

Tried Basic Authentication, OAuth, with and without app password. Finally decided to go with SSH, and this works for me.

Same error here after switching to an Atlassian account.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

1,932 views 7 10
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