I just used the key generation features in the Accounts dialog to generate a key and modify my SSH configuration for a GitLab Enterprise account. Unfortunately, SourceTree 4.1.8 (on Mac OS Monterey) put buggy configuration in my ~/.ssh/config file, as follows. Note that all of these bugs appear to be related to the space in "GitLab Enterprise".
- The `HostName` line contained `GitLab Enterprise` instead of the actual name of my GitLab host. This is both a syntax error (the hostname can't contain spaces) and incorrect.
- The key file created by SourceTree was called "GitLab Enterprise". That's fine, but the relevant line in the SSH config file said `IdentityFile /Users/marnen/.ssh/marnen-GitLab Enterprise`. The space is a syntax error, and I had to put double quotes around the filename to get it to work.
- The `Host` line in the SSH config file says `Host marnen-GitLab Enterprise`. That's not a syntax error, but I don't think it's correct; that line is supposed to contain multiple space-separated patterns.
As mentioned above, I suspect that all these problems arise from SourceTree not handling the space in "GitLab Enterprise" correctly when writing the SSH config file. Please fix this.