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

Accessing GitHub and Bitbuckt via OAuth with same username fails

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Highest
    • Resolution: Answered
    • 2.5
    • 2.5.2
    • Bitbucket
    • None
    • Severity 1 - Critical

    Description

      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? 

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              8018270b360f Johannes Hiemer
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: