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

Sourcetree login issues SDNetDomain error 7

Sourcetree cannot login to personal Bitbucket Server. I get the following error:

----------------------------------

Login failed for your Bitbucket Server account.

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

----------------------------------

Software:

OS: Mac Sierra

BitBucket Server 5.7

SourceTree 2.7.1

 

Methods I have tried:

I have verified that I can login to the BitBucket Server using my username and password.

I have verified that I can make commits to BitBucket Server using the terminal.

During account creation under SourceTree I have used both protocols HTTPS and SSH.

I disabled SSL verification under the Git tab.

 

I did change the password to my account and I was able to make the error disappear but it reappear after the second login attempt.

 

Does anyone know how to solve this error or squelch this error message? If anyone can comment, please do thanks!

2 answers

Hi Robert! Do you have two-step verification enabled? This might be causing the issue. You can try to fix this by creating a Personal access token as explained at Personal access tokens. After that, open Sourcetree, go to Settings, remove the account listed and add your account again.

Please confirm that you added your account following the steps at. Connect your Bitbucket account

There are some other users sharing their solutions in this Community thread, you might want to give it a try too. 

Let us know if it helps!

Ana

Thank you for the help Ana, I appreciate it very much. I have tried the suggestions above and none seems to resolve the error.

Bitbucket Server seems to not offer two-step verification, so I do not believe this could be the issue.

I remade a new account in Sourcetree and added the personal token access as a password but the error persisted.

I did create an account on Bitbucket Cloud and the error did not appear so this seems to be a Bitbucket Server issue only. In my Bitbucket Server instance I enabled debug logging to make sure any issues would appear in the "atlassian-bitbucket.log" log file. There is nothing being reported in this log.

I will continue to resolve this issue and update the community on anything useful I find!

Can you please enable debug logging by running below command in terminal and send us some logs the next time you add the account?

defaults write com.TorusKnot.SourceTreeNotMAS "LogLevel" 5

Please send both console logs and Sourcetree  specific logs from ~/Library/Logs/Sourcetree

Few things to note while adding the account

1. Remove the existing account from preference window.

2. Make sure the corresponding keychain item is also removed. 

3. Add the account with https protocol and basic auth (OAuth isn't supported as of now and is also disabled). 

4. Make sure the URL is valid and includes any port number if required. 

5. Verify that Sourcetree wrote to keychain for the new account. 

Should you see the error again, please revert with logs. 

 

Thanks,
Manjunath
Sourcetree Mac Developer

I ran the command and followed the steps involved and this is what the log file printed out:

 

2018-03-16 17:37:20 +0000 () [AUTH] signing out of Bitbucket Server account
2018-03-16 17:37:20 +0000 () [AUTH] Removing the token available in the client before re-authentication

 

I verified that the keychain for the account was added after I created the new account and tried logging in.

Screen Shot 2018-03-16 at 1.52.18 PM.png

On SourceTree the error remains unchanged.

 

Screen Shot 2018-03-16 at 1.50.40 PM.png

 

Note:

I also reran the command with the new value "5" and it gave me more of the same:

 

2018-03-16 17:37:20 +0000 () [AUTH] signing out of Bitbucket Server account
2018-03-16 17:37:20 +0000 () [AUTH] Removing the token available in the client before re-authentication
2018-03-16 17:41:09 +0000 () [AUTH] signing out of Bitbucket Server account
2018-03-16 17:41:09 +0000 () [AUTH] Removing the token available in the client before re-authentication
2018-03-16 17:45:58 +0000 () [AUTH] signing out of Bitbucket Server account
2018-03-16 17:45:58 +0000 () [AUTH] Removing the token available in the client before re-authentication

Update:

 

I have been running these two versions for about 10 days and they both have been running well until yesterday. The error reproduce itself when I tried to clone a repository from my Bitbucket Server. I re-ran SourceTree and enabled logging using this command:

defaults write com.TorusKnot.SourceTreeNotMAS "LogLevel" 5

Here is what the log file printed out:

2018-03-26 19:58:03 +0000 (e) JSON parsing error - The data couldn’t be read because it isn’t in the correct format.
2018-03-26 19:58:13 +0000 (e) JSON parsing error - The data couldn’t be read because it isn’t in the correct format.
2018-03-26 19:58:44 +0000 (e) JSON parsing error - The data couldn’t be read because it isn’t in the correct format.
2018-03-26 20:04:35 +0000 () [AUTH] signing out of Bitbucket Server account
2018-03-26 20:04:35 +0000 () [AUTH] Removing the token available in the client before re-authentication
2018-03-26 20:19:10 +0000 () [AUTH] signing out of Bitbucket Server account
2018-03-26 20:19:10 +0000 () [AUTH] Removing the token available in the client before re-authentication

Any ideas on how to proceed with this, thanks!

@Manju@Ana Retamal

I solved my issue regarding Bitbucket Server 5.7 and Sourcetree 2.7.1. I ran a new installation since our company has been updating the Bitbucket Server from 4.11. I thought maybe it was our installation that was the issue and it was.

Sourcetree and Bitbucket Server now works and the error went away.

 

For anyone that is having this issue, I would recommend installing a brand new instance of your Bitbucker Server and SourceTree, then ensure that both installations went successfully. Afterwards you can migrate your repositories using these commands.

 

git clone --mirror URL

git push --mirror NEW URL

 

Many thanks for the Atlassian Team for reaching out

Ana Retamal Atlassian Team Mar 19, 2018

Glad you figured this out, Robert! Have a nice day :)

Ana

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,955 views 0 12
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