Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

oAuth error: Unable to get secret

DThangavel December 7, 2019

Source tree version 3.2.6 (Windows) not able to authenticate with Bitbucket.

While refreshing token it gives the following error. The button click does not open bitbcuket url instead open some localhost url http://localhost:34106 and show the below error message 

Authentication failed

Unable to get secret

Error Reading JObject from JsonReader. Path '', line 0, position 0

4 answers

1 vote
Joe_Gorse
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 13, 2020

I am on Windows 7 x64, Java 1.8.0_221. This problem was repeatable on multiple versions of SourceTree going back from 3.3.8 down to 3.1.3. I started an upgrade to Java and mysteriously OAuth began working again. FWIW YMMV.

Cheers,
Joe

seitahyi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 26, 2020

thx. bruh! it worked.

 

can't running sourcetee 3.3.8 version on my Windows 7 x64.

so, remove sourcetree 3.3.8 version then I jre latest version upgrade.

and then sourcetree 3.1.3 turn back installed.

it worked for me!!

0 votes
Tore_Forsgren
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 3, 2020

Also started having error "Error Reading JObject from JsonReader.."

Started with trying to add another github oauth account. It is mighty unclear where the oauth procedure fetches its account??? And it is not clear if you can have two different oauth definitions and if they can target the same github acount??

Why and when do you need to add the account to the repository url? There must be many ways to communicate to sourcetree what account you want to use in current session/project.

Solution:
Recovered from the "Error Reading JObject" -error by opening Sourcetree options - git and scrolling down to find button "Update Embedded" and if the fully automatic installation completes without error the problem may be fixed.

Sometimes the installation ends with and error and sometimes I have had TLS errors. (Maybe randomly locked by virus protection or Windows indexing and other horrors that can lock files)

Switching to "System" based Git version and back again seems to fix installation errors and when accounts a bit messed up.


 

Teisinger March 31, 2020

this didn't work for me...

Bharath.Pukkalla
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 23, 2021

Following solution worked for me

1. Open SoureceTree Options Window (Tools > Options)

2. Go to Network Tab

3. Proxy server settings

                  select use default os settings

                  select add proxy server config to git/mercurial

Please note - I am using a proxy server and trying to authenticate  with bitbucket over SSH

Like # people like this
0 votes
angelonikolaou December 13, 2019

I have the same problem. A more detailed explanation of my symptoms:

  • I connect to Sourcetree/Bitbucket with my Google account, so I can't use basic authentication as I don't have a bitbucket password. So I need to connect with OAuth, Basic authentication won't work
  • I deleted all Sourcetree passwords from Windows Credential Manager, as explained here, but it didn't help
  • I also deleted the passwrd file in Local folder, as explained here, but it didn't help
  • I now have no account at all on Sourcetree. I open Sourcetree, try to create an account, click on 'Refresh OAuth Token', the 'Confirm Access to your Account' page pops up, I grant access. 'Authentication is successful' shows up on browser side, I get the error as described on the 'Edit Hosting Account' menu.
  • If I retry to Refresh OAuth Token, I am asked to confirm access again,
  • Strangely, even though I revoke access to Sourcetree for Windows through Bitbucket website > Bitbucket settings > OAuth, every time I try to get an OAuth authentication it shows up there.
0 votes
Deleted user December 9, 2019

The same, even after disabling proxy, changing network connections..

DThangavel December 9, 2019

Miraculously it started working fine after a day. No idea how it started working. give it some time and check back.

DThangavel December 9, 2019

I take back my answer. Again same issue

bdadin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 10, 2019

I'm having the same issue starting a few days ago.

sinuke
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 23, 2019

same problem

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events