Hi,
I'm authenticated on SourceTree (via API Token) yet I can't fetch, push to remote repository:
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I know this one is little bit old but you never know:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.