Cannot add Bitbucket Account to Sourcetree
Asked by Andreas Schneider:

I had to create a new account on mac os x 10.14.1 powerbook due to icloud keychain issues. From this new mac account I cannot connect my bitbucket account schneiderandreas@mac.com nor clone the repository to this new account.

On some trials the window title will say please sign in to this account and showing some repository information. The Cancel button will remain the only option and it is not possible to add the account. When I hit the Clone button in these cases, cloning needs to be canceled with the following error:

git -c filter.lfs.smudge= -c filter.lfs.required=false -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree clone --branch master <https://resschneider@bitbucket.org/fitdrills/fitdrills.git> /Users/asd/fitdrills  
Cloning into '/Users/asd/fitdrills'...  
warning: templates not found /usr/local/git/share/git-core/templates  
Completed with errors, see above

On some trials an error will be shown instead of repository information and the Cancel button is the only option here too. Error: Invalid redirect_uri This integration is misconfigured. Contact the vendor for assistance.

I applied the following in the terminal already to try to reset source tree preferences: defaults delete com.torusknot.SourceTreeNotMAS


Answers:
author: Ana Retamal
body: Hi Andreas, welcome to the Community!

Are you trying to add it following the steps at [Connect your Bitbucket account](https://confluence.atlassian.com/get-started-with-sourcetree/connect-your-bitbucket-or-github-account-847359096.html)? If so, can you provide the following information?:

1. Do you have git installed? Which version?
2. What version of Sourcetree are you using?
3. Have you tried cloning this repo from the terminal? Do you get any error?

Let us know!

Ana

comments: author: Andreas Schneider
body: Hi Ana, Yes I followed these steps.

But everything worked fine now after I upgraded Sourcetree from Version 2.7.6 (177) to 3.0 (200). I hope I have some newbie credit for not checking this myself. Thank you very much for your help!

BTW: (1) did not change the git version 2.17.2 (Apple Git-113) on my mac, (3) I did not need to clone at all. Connected successfully to local directory again after the upgrade.

Thanks again! Andreas


author: tania_tg
body: I have the same problem. I have updated to the latest version, but when I want to add the account, I log in but there is no option but to "cancel". I can not add the account.

comments: author: lordgeyik
body: I have the same problem (Mac). No OK button to press and confirm.


author: AL20
body: Same problem here since alsmost a year on macosX 10.12.6 (sourcetree 2.7.6 --- 177).

Can we get any help ?


author: Bashu Naimi-Roy
body: Same problem for me.

No OK button, but the 'Please sign in to this account' message still displays at the top of the window, even after I've signed in (in the window), and I'm browsing around my Bitbucket account (in the window).

Only button is 'cancel', and clicking it takes me back to the Account dialog with a button to start the sign In process again.

MacosX 10.13.6, Sourcetree 2.7.6 - 177.


author: rippleau
body: Same problem... June 2021.

Is there actually an answer out there or should we just all use another app?


author: Arslan Ahmad Khan
body: just update your source tree and you will get rid of this issue.


author: afshin shahpari
body: In my experience, it was because I had already connected to another source control and the previous account existed in sourcetree desktop version. To solve, open client app, select the settings on top right of the screen, select both accounts and advanced tabs and remove items from there and retry cloning again from the menu.

comments: author: Helena Po?ar
body: This didn't help. I had another account, now I have 0 accounts and I still can't login to Bitbucket.. That is, I log in through the pop up window but only have Cancel option on it and I can browse the Bitbucket website..

Edit: updating SourceTree helped. The login no longer appeared in the popup window but took me to the website through browser and I was able to authenticate.