Uploaded image for project: 'Sourcetree For Mac'
  1. Sourcetree For Mac
  2. SRCTREE-4708

Accessing GitHub and Bitbucket via OAuth with same username fails

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Highest Highest
    • 2.5.2
    • 2.5
    • Bitbucket
    • None
    • Severity 1 - Critical

      I could reproduce this error/bug in SourceTree for a different setup (also still valid for 2.5 (104)):

      1. Take an GitHub account with username xyz
      2. Create an OAuth Authentication with username xyz and the same key 
      3. 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? 

            [SRCTREE-4708] Accessing GitHub and Bitbucket via OAuth with same username fails

            Stefan added a comment - - edited

            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. 

            Stefan added a comment - - edited 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. 

            Fix available in version 4.2.6. Kindly upgrade to latest version.

            Arati Mohanty added a comment - Fix available in version 4.2.6. Kindly upgrade to latest version.

            Hi everyone.

            We started analysing this issue and I have some difficulties with reproducing the same behaviour. I'm able to add two accounts with the same username using OAuth for GitHub and Bitbucket without any errors.

            Maybe you have any additional details, maybe someone could record video with steps to reproduce. It will be very helpful to understand this issue better.

            8018270b360f, 84139d49fba8 , 752f00a38874 , could you please check if this issue is still reproducible in latest Sourcetree version (https://www.sourcetreeapp.com/)?

            Thank you so much.

            Raman Sidarakin (Inactive) added a comment - Hi everyone. We started analysing this issue and I have some difficulties with reproducing the same behaviour. I'm able to add two accounts with the same username using OAuth for GitHub and Bitbucket without any errors. Maybe you have any additional details, maybe someone could record video with steps to reproduce. It will be very helpful to understand this issue better. 8018270b360f , 84139d49fba8 , 752f00a38874 , could you please check if this issue is still reproducible in latest Sourcetree version ( https://www.sourcetreeapp.com/ )? Thank you so much.

            Reopened this issue. I also created an internal issue for analysing this. We will work on this according to priorities.

            Thanks all for commenting this issue and bringing it up.

            Raman Sidarakin (Inactive) added a comment - Reopened this issue. I also created an internal issue for analysing this. We will work on this according to priorities. Thanks all for commenting this issue and bringing it up.

            Still not resolved Mac OS 13.4.1

            Daniel Harper added a comment - Still not resolved Mac OS 13.4.1

            Andrew Law added a comment -

            Seemingly not resolved in 4.2.0 - Mac OS 11.7

            Andrew Law added a comment - Seemingly not resolved in 4.2.0 - Mac OS 11.7

            Olivier Guilleux added a comment - - edited

            Not resolved in 4.0.2 - Mac OS 10.15.7

            Olivier Guilleux added a comment - - edited Not resolved in 4.0.2 - Mac OS 10.15.7

            0plus1 added a comment -

            Not resolved in latest 4.0.1

            0plus1 added a comment - Not resolved in latest 4.0.1

            anri added a comment -

            not resolved

            anri added a comment - not resolved

            I'm having this on 2.7.6 (177) on macOS Sierra 10.12.6

            Krisztian Fekete added a comment - I'm having this on 2.7.6 (177) on macOS Sierra 10.12.6

              43c951f935c6 Raman Sidarakin (Inactive)
              8018270b360f Johannes Hiemer
              Affected customers:
              0 This affects my team
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: