I switched to API token this morning as we are told app passwords are depreciated and we are forced to move this way. However since doing this I'm totally locked out from bitbucket via SourceTree! I have tried absolutely everything!
Deleted passwd file
Tried both email address and user addy in combination with API Token and my password. No combination hits.
I'm getting Authentication failed. Failed to get user details. You do not have permission to access URL https://api.bitbucket.org/2.0/user.
Well this is just stupid! What the hell am I meant to do. I've delete and reset token multiple times, changed my password. Reinstalled, deleted files. Such a terrible system I'm seriously thinking of shifting all our stuff to Github and be done with it.
If anyone has any ideas, otherwise I'll plan to start migrating next week as it is holding our work up.
Hey @Ed Williams ,
Which Sourcetree version are you using? I believe API tokens are only supported in Windows 3.4.24+ or macOS 4.2.13+
If you're on an older version, authentication will fail.
Also, API tokens used to perform Git commands must have scopes - see Using API tokens.
These instructions should work:
|
What you might try is to use the command line with your API token and try cloning or pushing to see if it will work there. (If it works, you'll know it's Sourcetree issue) 👀
Additional materials: Add an API token to Sourcetree or another application
Cheers,
Tobi
@Tomislav Tobijas Thanks for your reply. After reinstallation again from scratch and following the above I have now got a different error which is around what permissions I should give in the API scope. I gave it read account and read/write repositories but it is still complaining about 'Failed to get user details' Lack one or more privilege scopes etc. Can't find anything only about what scope permission should be for SourceTree use.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Tomislav Tobijas I have now got this working finally. However I'm still getting a login prompt when I try to push. Which was the original problem I had last night after installing Git LFS. It keeps looping credentialhelperselection dialogue and regardless what combination of details I put in. It just loops :/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad at least there are some updates about this (even if you actually got back to the initial problem).
...I have now got a different error which is around what permissions I should give in the API scope...
I think your API token should include full repo scope, not just read or write, but the entire repo permission.
Also, is your remote URL HTTPS? Note that API tokens do not work with SSH.
I've just tested this and I got it working with the following setup (I've used Bitbucket cloud):
After clicking on "Refresh App Password", in the prompt for "Password", I've added the newly created API token. 👇
Note that I've created an API token via https://id.atlassian.com/manage-profile/security/api-tokens > Create API token with scopes
I haven't worked or troubleshooted that much those issues with credential managers so I'm not sure what else you could check :/
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.