-
Bug
-
Resolution: Fixed
-
High
-
None
-
4.2.1
-
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`
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.