sublime_merge icon indicating copy to clipboard operation
sublime_merge copied to clipboard

Sublime Merge SSH permission denied

Open guroyerdev opened this issue 6 years ago • 5 comments

Latest as of 2019-10-30

  • OS: macOS 10.15
  • Build: 1119

Description 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.

guroyerdev avatar Oct 30 '19 15:10 guroyerdev

Found out that the issue is that the config file in the .ssh folder were not used by sublime merge. To fix my issue I ended up modifying the ssh config file under /etc/shh called ssh_config. Added 2 lines at the end under the "host" section

  • IdentityFile ~/.shh/private_key_filename
  • UseKeychain yes

Nowhere did I find a solution for this online... which begs the question, could this be due to where my sublimemerge.app file is located? I moved it to the Application folder after downloading it.

guroyerdev avatar Oct 30 '19 16:10 guroyerdev

This is more of a git & macOS configuration issue that Atlassian needs to update for Sierra & above. You can see GitHub's documentation specifies those two extra config items here. Also, the documentation here also sheds light that the default id_rsa files only worked by default until El Capitan.

srbs avatar Nov 05 '19 05:11 srbs

I have also been running into this issue repeatedly. Sometimes SublimeMerge respects the SSH keys that I have added to my keychain (as suggested here), but more often than not it still throws a permissions error from the app. It was also suggested in that thread to change the git binary in Settings, but that had no effect.

This is more of a git & macOS configuration issue

Not necessarily. As long as an agent or the keychain have the key and your ~/.ssh/config file is valid, there should be no reason why SublimeMerge fails to utilize it when git from a terminal has no issue.

I noticed that from the app console, it attempts to fetch with the following command:

git -c credential.helper=/Users/<user>/Applications/Sublime\ Merge.app/Contents/MacOS/git-credential-sublime fetch origin --progress

What is the point of git-credential-sublime? It has no help options and doesn't appear to do anything from the perspective of a user.

As a side note, none of this occurs on the Linux release of SublimeMerge; as long as the key is added to an agent then the app has no issue contacting the remote. I also never had to use MacOS's keychain before SublimeMerge in order to work with my repos via public keys. That it appears that I have to for SublimeMerge seems like an odd design decision.

kyberdin avatar Aug 02 '20 12:08 kyberdin

i am getting the same problem on Ubuntu 18.04 LTS

manasmgkar avatar Sep 09 '22 08:09 manasmgkar