Still can't connect because of 'unable to get secret' error
Asked by angelonikolaou:

Hello,

I already discussed my problem in a comment in a [similar post](https://community.atlassian.com/t5/Sourcetree-questions/oAuth-error-Unable-to-get-secret/qaq-p/1246022#M33935), but no reply came, so I start a new post.

I can't use Sourcetree to connect to Bitbucket for a month now, even though I used it for two years without a problem.

When I click 'Refresh OAuth Token' I get a 'Confirm Access' page on my browser, then an 'Authentication successful' page. Then, I get the following error in Sourcetree

![2020-01-14 08_59_51-Edit Hosting Account.png](/t5/image/serverpage/image-id/78848i8B0A88D9508F6A01/image-size/large?v=v2&px=999 "2020-01-14 08_59_51-Edit Hosting Account.png")

I have tried the following:

* Deleting all Sourcetree passwords from Windows Credential Manager
* Revoking OAuth authentication from my BitBucket account
* Reinstall Sourcetree
* Different browser
* Connecting with Basic authentication using a different account I have. Even though the password was correct, I still couldn't connect.
* Closed live protection from my antivirus (Malwarebytes Antimalware)

Any help provided would be greatly appreciated!

EDIT: Added more fix attempts


Answers:
author: nikolag
body: I have the same problem.

comments: author: STG
body: Hello, I have th esame problem. Did you find the solution?.


author: angelonikolaou
body: Nothing yet. I basically switched to a different tool.


author: Steve Farmer
body: Hi. I have this issue too. What too did you switch to?


author: Angelo Nikolaou
body: I managed to make bitbucket work by switching back to version 3.3.9. Haven't updated since. Try that


author: DeathPhoenix
body: I had the same issue this morning. I now know what happened, so let's see if my case is helpful for you.

Here is what I had to do to solve this (following that order):

* Updated to the latest SourceTree version
* Validate that your TLS 1.2 is activated. On Windows 7, you will have to edit the registry with regedit (you can find easy steps on internet)
* You have to update your Embedded GIT as well. Go in Tools -\> Options -\> Git -\> Press the button Update Embedded (at the bottom). You shouldn't see an SSL error here anymore.
* Once this is done, I went to the Authentication dialog pointed out here and I could successfully "Refresh OAuth Token".

**Simple remark**: I updated my SourceTree from a really old version (1.x to 3.3.8). In previous version, TLS 1.2 wasn't mandatory. Also, I'm running on Windows 7 and TLS 1.2 isn't enabled by default. It may not fully be your case, but those steps could cover your problem as well.

Now it's working!

Finally!


author: DeathPhoenix
body: I had the same issue this morning. I now know what happened, so let's see if my case is helpful for you.

Here is what I had to do to solve this (following that order):

* Updated to the latest SourceTree version
* Validate that your TLS 1.2 is activated. On Windows 7, you will have to edit the registry with regedit (you can find easy steps on internet)
* You have to update your Embedded GIT as well. Go in Tools -\> Options -\> Git -\> Press the button Update Embedded (at the bottom). You shouldn't see an SSL error here anymore.
* Once this is done, I went to the Authentication dialog pointed out here and I could successfully "Refresh OAuth Token".

**Simple remark**: I updated my SourceTree from a really old version (1.x to 3.3.8). In previous version, TLS 1.2 wasn't mandatory. Also, I'm running on Windows 7 and TLS 1.2 isn't enabled by default. It may not fully be your case, but those steps could cover your problem as well.

Now it's working!

Finally!

comments: author: Jeremy Dore
body: Excellent info, thanks - worked for me.


author: fernanda.kelly
body: Exelente !! Muito obrigada, funcionou para mim.


author: Emman Jay Dizon
body: not work for me, any other solutions?


author: Teisinger
body: Same problem here

comments: author: DeathPhoenix
body: DELETED


Tags: bitbucket