I could reproduce this error/bug in SourceTree for a different setup (also still valid for 2.5 (104)):
- Take an GitHub account with username xyz
- Create an OAuth Authentication with username xyz and the same key
- Repeat the step above for Bitbucket also with username xyz
Result: the authentication will always fail for the second account added with the following error log:
2017-04-16 07:26:53 +0000 (e) Error fetching password for SourceTree (OAuth) account with username xyz. Error Description - The specified item already exists in the keychain. 2017-04-16 07:27:04 +0000 (e) [AUTH] Error: Cannot Authorize (Bitbucket) 2017-04-16 07:27:04 +0000 (e) Fetching User owned repositories for Bitbucket cloud account failed. Error - Could not authorize request with the available token. Please re-authenticate. 2017-04-16 07:27:09 +0000 () [AUTH] beginning authentication for Bitbucket account 2017-04-16 07:27:12 +0000 (e) [AUTH] sign-in failed with error: The operation couldn’t be completed. (com.google.GTMOAuth2 error -1000.)
It seems as the key for the account is somehow related to the username, instead of the username and a unique account id.
Any comments on that?
- is cloned from
-
SRCTREE-4595 Refreshing Remote Repositories Failed
-
- Closed
-
- relates to
-
SRCTREE-7807 Unable to use macOS Keychain for two different accounts with the same username
-
- Closed
-
- was cloned as
-
SRCTREE-7284 Accessing GitHub and Bitbucket via OAuth with same username fails
-
- Closed
-
I am experiencing this issue with SourceTree 4.2.7, MacOS 14.4.
As a workaround, I switched to a Personal Access Token for GitHub.