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

SourceTree generated SSH config: terminating, 2 bad configuration options

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • None
    • 4.2.3
    • GitLab
    • None
    • Severity 2 - Major

      For Gitlab Enterprise account, I get the following generated ssh settings from SourceTree that does not seem to work and unsure how to fix:

      1. — Sourcetree Generated —
        Host user-GitLab Enterprise
            HostName GitLab Enterprise
            User user
            PreferredAuthentications publickey
            IdentityFile /Users/user/.ssh/user-GitLab Enterprise
            UseKeychain yes
            AddKeysToAgent yes
      2. ----------------------------

      The error from this reads as follows:

      /Users/user/.ssh/config line 14: keyword hostname extra arguments at end of line

      /Users/user/.ssh/config line 17: keyword identityfile extra arguments at end of line

      /Users/user/.ssh/config: terminating, 2 bad configuration options

      fatal: Could not read from remote repository.

       

      This is only for GitLab EE, I also have a Github that does work fine. I'm on a MacBook Air M2 with SourceTree 4.2.3 and imbedded git

            [SRCTREE-8052] SourceTree generated SSH config: terminating, 2 bad configuration options

            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.

            Hi, 5a5694341b41 

            Thanks for contacting us.

            It looks like Sourcetree generates wrong value for `Host` entry. In your `~/.ssh/config` you have this line:

            Host user-GitLab Enterprise

            And it looks like not a host, it looks like ssh key name. 

            To workaround this issue you need to modify your `~/.ssh/config` the next way:

            1. You need to get host url. It's the same value, which you specified in Sourcetree settings when you've added your GitLab EE account: https://drive.google.com/file/d/1sg0dwZIs1fPhWoE_sippO64c_yqjQ_YZ/view?usp=sharing
            2. Open your `~/.ssh/config`
            3. Find this line
              Host user-GitLab-Enterprise

              and replace `user-GitLab-Enterprise` value with host which you found at the step 1.

            1. Save the `~/.ssh/config` file.
            2. Now everything should work

            Let me know if it helped or if you have sone questions.

            From our side we will create internal task to fix this issue and deliver it in one of the next releases.

            Thanks.

             

             

            Raman Sidarakin (Inactive) added a comment - - edited Hi, 5a5694341b41   Thanks for contacting us. It looks like Sourcetree generates wrong value for `Host` entry. In your `~/.ssh/config` you have this line: Host user-GitLab Enterprise And it looks like not a host, it looks like ssh key name.  To workaround this issue you need to modify your `~/.ssh/config` the next way: You need to get host url. It's the same value, which you specified in Sourcetree settings when you've added your GitLab EE account: https://drive.google.com/file/d/1sg0dwZIs1fPhWoE_sippO64c_yqjQ_YZ/view?usp=sharing Open your `~/.ssh/config` Find this line Host user-GitLab-Enterprise and replace ` user -GitLab-Enterprise` value with host which you found at the step 1. Save the `~/.ssh/config` file. Now everything should work Let me know if it helped or if you have sone questions. From our side we will create internal task to fix this issue and deliver it in one of the next releases. Thanks.    

              Unassigned Unassigned
              5a5694341b41 Marc van Eck
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: