How to connect Sourcetree with Bitbucket Data Center using SAML

Greens May 27, 2024

We are using the latest version of Bitbucket Data Center, using SAML for logging in.
Basic authentication is disabled.

How can Sourcetree be used with this configuration? 

1 answer

1 vote
Greens May 28, 2024

After some searching I found one way:

 

You need an HTTP access token for your account on the Bitbucket server. (Manage account -> HTTP access tokens).


When you use git CLI, the Bitbucket server can be used by adding

 -c http.extraHeader="Authorization: Bearer [your access token]" 

to the initial git clone command. The configuration is added to the local .git/config file.


It is more convenient to add it to the git global config:

git config --global http.extraHeader "Authorization: Bearer [your access token]"

 

In Sourcetree it is still not possible to add an account but at least now you can use 'Clone' in a new tab.

afbeelding.png

Keep in mind that the token is plain text visible in config files.
When compromise is suspected you can simply revoke the token.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events