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/
Refreshing the API Token was successful.
[core]repositoryformatversion = 0filemode = falsebare = falselogallrefupdates = truesymlinks = falseignorecase = true[remote "origin"]fetch = +refs/heads/*:refs/remotes/origin/*[branch "prod"]remote = originmerge = refs/heads/prod[branch "beta"]remote = originmerge = refs/heads/beta
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.
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:
After:
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!
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.