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 & SourceTree-Beta macOS Fail Authentication with Local BitBucket Server Edited

UPDATE: Tower 2.6.4 works without issue. 

System: macOS 10.13.4b1

SourceTree Versions Affected: 2.7.1 beta latest build 2018-02-06 & 2.7

BitBucket Server: 5.7.1

ISSUE: When setting up the Bitbucket AD linked account in SourceTree it is unable to authenticate on both ssh and https. 

http error window:

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

http error log: 

2018-02-06 19:59:30 +0000 () [AUTH] Removing the token available in the client before re-authentication
2018-02-06 20:00:26 +0000 () [AUTH] signing out of Bitbucket Server account

 

ssh error window: 

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

 

ssh error log: 

2018-02-06 19:59:30 +0000 () [AUTH] Removing the token available in the client before re-authentication
2018-02-06 20:00:26 +0000 () [AUTH] signing out of Bitbucket Server account

 

Attempted Fixes: 

Delete all SourceTree files from ~/Library/ 

Delete Account and Recreate

Try Beta SourceTree Build

1 answer

0 votes
Manju Atlassian Team Feb 07, 2018

From the logs you've pasted here, it looks like you are trying to use Bitbucket Server account with OAuth. Can you confirm that? 

Currently, we do not support OAuth for Bitbucket Server accounts. Please try to add the account in Preferences with basic auth and that should work. If you encounter an issue with that, report back here with details. 

This is while using basic AUTH selected. And I have purged all settings and created it again. I agree it seems to be attempting OAuth. But its not in a setting I was able to choose. 

Manju Atlassian Team Feb 07, 2018

Can you check if the keychain has an item with the title <yourbbserver> Access key for <yourusername> and there is a file <yourusername>@STAuth-<yourbbserver> at ~/Library/Application Support/SourceTree/ ?

If the account was successfully added, these two items must be found. 

If not, remove the account in Preference and add it again. (do not edit the existing account). If the keychain item isn't found this time, restart the mac once and try again. This happens when there is a permission issue with keychain allowing access to Sourcetree.

SourceTree creates application password entries in my local keychain: <yourbbserver> Access Key for <yourusername> 

 SourceTree does prompt for keychain access and is allowed access. And since it is writing to the keychain it has access. The same log entries however appear. This time prior to switching from Bitbucket to Bitbucket server I selected Basic auth as that option is grayed out when you select Bitbucket server. This did not make any difference. 

Manju Atlassian Team Feb 07, 2018

Alright! This is a little weird. 

An access prompt for that particular keychain item must come up ideally. Just because Sourcetree wrote it doesn't mean it has access to it. Just to test, under access control of the keychain item, can you set "Allow all applications to access this item" and see if it helps?

Key Access does prompt for allowing SourceTree access to the keychain and the entry does allow sourcetree access. Seen in picture belowScreen Shot 2018-02-07 at 2.19.05 PM.png

Also, Remote Repositories do populate however when I go to clone them is when I receive the error below.Screen Shot 2018-02-07 at 2.21.34 PM.png

Other than what you've already provided above, do you have any other logs when this happens?

If not, you can enable debug mode logging by running below command. 

defaults write com.TorusKnot.SourceTreeNotMAS "LogLevel" 5

Remember to restart the app after enabling debug logging. 

Also, can you specify if you are using https or ssh?

 

Thanks!

HTTPS and I've ran the command and I see it in the plist but I'm not seeing any additional logging. Should this also be loging in the ~/Library/Logs/SourceTree directory? 

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,942 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