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.

Like Tomislav Tobijas likes this
Michalina Tylska
July 22, 2026

I also noticed that after creating API token there is nothing showing up in my App passwords on bitbucket, where before there were there..

So not sure why they are not listed anymore? Screenshot 2026-07-22 144857.jpg

Tomislav Tobijas
Community Champion
July 22, 2026

@Michalina Tylska related to API tokens (if you're using personal ones), these are actually listed here: https://id.atlassian.com/manage-profile/security/api-tokens

So, not under App passwords anymore but under your Atlassian Account > Security > API Tokens.
I suspect that "App passwords" page will be deprecated or removed at some point.

As for API token, can you follow these instructions to create one (for Bitbucket of course): https://www.loom.com/share/24312497653d43adadefa11bb4f8ebce

As for fetching this endpoint you've linked, there have been some changes around that, so I'd recommend checking this out: https://community.atlassian.com/forums/Bitbucket-questions/replacements-for-deprecated-user-scoped-permission-endpoints/qaq-p/3166685
Official changelog is here: https://developer.atlassian.com/cloud/bitbucket/changelog/#CHANGE-2770

Michalina Tylska
July 23, 2026

Hi @Tomislav Tobijas ,

I have tried API token way but that didn't work for me.

I have now switch to SSH key and that seems to sort out the issue and I can access my repo, push and fetch. 

Thank you for your help and have a nice day,

Like Tomislav Tobijas likes this

Suggest an answer

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

Atlassian Community Events