• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • None
    • 4.2.1
    • GitLab
    • None
    • Severity 2 - Major

      Issue Summary

      Link to original community question here

      So, SourceTree has a bug trying to interract with GitLab (on OSx 12.6.3)

      First of all I tried to setup connection using private token, created in GitLab profile settings. I granted all the access to that token, added account in SourceTree, successfully logged in and I could grab the repo from GitLab using https link.

      However, I couldn't push any changes receiving error
      `git@gitlab.com: Permission denied `

      Using SourceTree on Windows 11 i didn't have any issue - after logging (just login/password, not a private token) I could execute any operation.

      After founding the answer in GitLab I posted above I found that /Users/<User>/.ssh/config had a wrong entry.

      Expected Results

      # --- Sourcetree Generated ---
      Host gitlab.com
      HostName gitlab.com
      User <username>
      PreferredAuthentications publickey
      IdentityFile /Users/<user>/.ssh/<user>-GitLab
      UseKeychain yes
      AddKeysToAgent yes
      # ----------------------------
      

      Actual Results

      # --- Sourcetree Generated ---
      Host <user>-GitLab
      HostName GitLab
      User <username>
      PreferredAuthentications publickey
      IdentityFile /Users/<user>/.ssh/<user>-GitLab
      UseKeychain yes
      AddKeysToAgent yes
      # ----------------------------
      

      Steps to Reproduce

      see above

      Workaround

      So, to workaround this issue you need to open `~/.ssh/config ` and change `host` and `hostname` to correct value: `gitlab.com`

            [SRCTREE-8004] Sourcetree creates broken SSH config for GitLab

            The fix for this issue is available in Sourcetree 4.2.4.
            You could upgrade your Sourcetree via "Check For Updates" feature or directly download it from official website.
            Thanks.

            Raman Sidarakin (Inactive) added a comment - The fix for this issue is available in Sourcetree 4.2.4. You could upgrade your Sourcetree via "Check For Updates" feature or directly download it from official website. Thanks.

              Unassigned Unassigned
              43c951f935c6 Raman Sidarakin (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: