I created an API key in Bitbucket as indicated in the Sourcetree documentation with scopes as indicated.
Then in Sourcetree I wanted to change my account (with existing username) over to API Token. I entered my correct e-mail below the dropdown and set my existing username in the dialog that follows. But then the API key is not recognized and error 'Failed to get user details, You do not have permission to access URL etc. request returns with status Unauthorized.
The only way to let the API token be accepted is when I set the username to my e-mail address. But then of course no repository actions will work anymore.
Removing old entries in Credential Manager (I am doing this on Windows) did not solve the problem.
How to solve this, now unable to use Sourcetree ;-[
Can you try what was already recommended here?
Best,
Fadoua
@Tinker Fadoua Thanks for this suggestion it worked when changing the URL of the repository settings using this format:
git clone https://<bitbucket_username>:<api_token>@bitbucket.org/<workspace>/<repo>.git
I tought of this before but hesitated to paste the very long API Token in this URL.
This piece of info was indeed the clue,
Roelof
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To avoid the problem I
But then pushing fails with:
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/RoelofSandP/xmaps_portal.git/': The requested URL returned error: 410
So oAuth workaround fails.....
Using version Windows 3.4.31 (latest as of today)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for providing additional info!
Have you maybe tried following the steps in the link Fadoua provided?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @R J Janssen ,
Are we talking about Bitbucket on-prem or cloud? Also, when you say
...no repo actions will work anymore...
what do you mean by that? 🤔 Are we talking about authentication under Tools → Options → Authentication succeeds after changing the username to your email address, but operations such as fetch/pull/push against an existing repository then fail?
If so, can you share which error do you get?
Generally speaking:
Note that existing Git credentials can sometimes still be cached separately.
I would also check/remove any existing Bitbucket credentials from Windows Credential Manager (as you did) and verify the repository's configured remote URL under Repository Settings → Remotes. 👀
Cheers,
Tobi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Local Windows client and cloud repo.
By repository changes I meant push/pull etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The error I get after a push I added in the first answer.
The remote URL of the repository I am pushing to still contains my existing user name
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.