I spent a day trying to solve this issue and finally found this answer on GitLab
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:
```
# --- Sourcetree Generated ---
Host <user>-GitLab
HostName GitLab
User <username>
PreferredAuthentications publickey
IdentityFile /Users/<user>/.ssh/<user>-GitLab
UseKeychain yes
AddKeysToAgent yes
# ----------------------------
```
I changed it to:
```
# --- Sourcetree Generated ---
Host gitlab.com
HostName gitlab.com
User <username>
PreferredAuthentications publickey
IdentityFile /Users/<user>/.ssh/<user>-GitLab
UseKeychain yes
AddKeysToAgent yes
# ----------------------------
```
and it works now.. Fix the bug guys
Hello, @Roman Ivanicky
Thanks for reporting this issue. I'm glad to hear that finally you found a workaround that works for you.
I created ticket that describes your issue. So, you will be able to track progress of fixing this bug inside this ticket https://jira.atlassian.com/browse/SRCTREE-8004
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.