Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Authentication bitbucket issue

Michalina Tylska
July 21, 2026

Hi,

I'm authenticated on SourceTree (via API Token) yet I can't fetch, push to remote repository:

Screenshot 2026-07-21 122103.jpgScreenshot 2026-07-21 122228.jpg

2 answers

1 vote
Tomislav Tobijas
Community Champion
July 21, 2026

Hi @Michalina Tylska ,

Any chance you can try using OAuth instead of API tokens? I've seen a couple of discussions around this and it would seem that OAuth works much better than this method. 👀

Also, if we're talking about API tokens, can you maybe try clearing out all auth credentials from credential manager and then re-adding the token to see if that will help?

There are a couple of discussions/questions and answers around this area, so I'd recommend checking them out:

Cheers,
Tobi

Michalina Tylska
July 21, 2026

Hi @Tomislav Tobijas ,

Thank you for this.

I have tried clearing Credentials and reinserting API token and that didn't change anything.

For the OAuth seems like that didn't change anything as well and error still occuring.

Tomislav Tobijas
Community Champion
July 21, 2026

Hi @Michalina Tylska ,

Just to confirm - you're on Mac or Windows? Also, which version of Sourcetree are you currently running?

There's also this suggestion by another user on the existing bug report:

...After upgrading the embedded Git in SourceTree then it started to work...

Potentially this could work 🤔

Cheers,
Tobi

Michalina Tylska
July 21, 2026

Thanks! I'm on Windows 11 and I got the latest version of SourceTree: 3.4.31. I tried adding API token to URL and still get the error. I had run through this forum for few days now and tried few (if not all) suggested fixes but still no luck so I decided to post myself to see if that would get me anywhere. 

Like Tomislav Tobijas likes this
Tomislav Tobijas
Community Champion
July 22, 2026

Ah, that’s unfortunate... 😕

Any chance you could try authenticating with the same API token on another device? That might help determine whether the issue is related to your Bitbucket account/token or something specific to the current Windows/Sourcetree environment (most likely, we're talking about this).

Michalina Tylska
July 22, 2026

Hi, I don't have access to any other device unfortunately.

I have run a command:

curl -I -H "Authorization: Bearer <my token>" https://api.bitbucket.org/2.0/repositories

and got the message :

'' HTTP/1.1 401 Unauthorized
Content-Type: application/json
Content-Length: 105
Connection: keep-alive
Date: Wed, 22 Jul 2026 10:27:51 GMT
Server: AtlassianEdge
Www-Authenticate: OAuth realm="Bitbucket.org HTTP"
Vary: origin

...''

 

I have ticked all the scopes when I created my token.

Suggest an answer

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

Atlassian Community Events