Sublime Forum

Sublime Merge SSH permission denied

#1

Hi,
I’m on MacOS Catalina, and I am trying to clone a repositoy from bitbucket.

I followed the atlassian documentation to connect via ssh to the repo : https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html
(Section git for macos)

After doing all this I get the Permission Denied (public key) error message from sublime merge when I try to clone my repo. I’m able to successfully clone my repo using git in the terminal, but it doesnt work on sublime merge.
I tried many many different things, without success.

Any help will be greatly appreciated.

0 Likes

#2

I believe the issue could be that SublimeMerge is running git with “sudo”. Since my keys are on a user level, the sudo isn’t picking up any keys. Any idea how I would fix this? Or if this is not the issue, disregard this comment.

0 Likes

#3

So this ended up being a good lead! Found a solution!

I modified the root ssh_config file with identifier to my file. I did the following

  • cd /etc/ssh
  • sudo nano ssh_config
  • at the end of the file, there is the “host” section that is similar to the config file that was created in the .ssh folder. add 2 new lines under the “host”. 1. “IdentityFile ~/.ssh/your_private_key_filename” and 2. “UseKeychain yes”.
0 Likes