Forums

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

Using a BitBucket API Token in SourceTree Windows

Jean Lalonde
August 3, 2026

I'm trying to use the token created on BitBucket.org to push the changes in my repo using SourceTree Windows v3.4.31. When I try to push, I receive this error:

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v origin prod:prod
remote: CHANGE-3222 - Functionality has been deprecated
remote: App passwords are deprecated and must be replaced with API tokens.
remote: https://developer.atlassian.com/cloud/bitbucket/changelog#CHANGE-3222
fatal: unable to access 'https://bitbucket.org/JLalonde33/quickclipboardeditor.git/': The requested URL returned error: 410


Pushing to https://bitbucket.org/JLalonde33/quickclipboardeditor.git
Completed with errors, see above.

My authentication setup in SourceTree was set as specified in :
https://support.atlassian.com/bitbucket-cloud/docs/add-an-api-token-to-sourcetree-or-another-application/

1V8igWz

Refreshing the API Token was successful. 

7mn4jrU

 

However, SourceTree still produces the error "App passwords are deprecated and must be replaced with API tokens". It is as if the new account's token was not used by my repo.
The repo config is:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "prod"]
remote = origin
merge = refs/heads/prod
[branch "beta"]
remote = origin
merge = refs/heads/beta
I'm not sure if this can be related, but if I remember well, when I update the account details in SourceTree, my username was changed from "jlalonde33" (username only) to "jlalonde33@gmail.com" (username and GMail domain).
Any help would be appreciated.

2 answers

1 accepted

1 vote
Answer accepted
Gabriela - LeanZero
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
August 4, 2026

Hi Jean, that 410 is Bitbucket saying it got an app password, so what you refreshed isn't reaching it. A bad or under-scoped token gives 401, so that isn't it.

Your gmail hunch is worth pulling on. Sourcetree stores credentials per identity as USERNAME@DOMAIN, and only uses the account ones when the remote URL carries no username. Yours pins JLalonde33. So git may still be looking up that old entry, while your refresh landed under jlalonde33@gmail.com.

Check Tools > Options > Git and see which embedded Git you're on. Richard Brookes-Tee, also on 3.4.31, cleared Windows Credentials, cleared Sourcetree and revoked his app passwords with no effect, then found his sitting on 2.2x. Updating it, choosing "Manager", then taking the web/OAuth side of the new prompt, since the API Token side didn't stick for him: his write-up

If yours is already current, change the identity in the remote to force a fresh lookup:

git remote set-url origin https://x-bitbucket-api-token-auth@bitbucket.org/JLalonde33/quickclipboardeditor.git

That's Atlassian's static username for API tokens. I haven't run either through Sourcetree myself.

It's also open on their tracker as SRCTREE-8274, logged against the Mac build but the same symptom.

0 votes
Jean Lalonde
August 4, 2026

Check Tools > Options > Git and see which embedded Git you're on. Richard Brookes-Tee, also on 3.4.31, cleared Windows Credentials, cleared Sourcetree and revoked his app passwords with no effect, then found his sitting on 2.2x. Updating it, choosing "Manager", then taking the web/OAuth side of the new prompt

I think it made it.

Before:

 wXNrMqo

After:

 qRVJro9

A popup prompted me to select "Manager" a few times. I selected "Always use...". I won't push in the next days. Let's see later if everything remains OK.

Thanks for your help Gabriela!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events