sublime_merge icon indicating copy to clipboard operation
sublime_merge copied to clipboard

Set either `DISPLAY=whatever` or `SSH_ASKPASS_REQUIRE=force` on macOS

Open ffuugoo opened this issue 2 years ago • 6 comments

Problem description

ssh-add would only call SSH_ASKPASS if either DISPLAY environment variable is set (and, I'd assume, is not null) or if SSH_ASKPASS_REQUIRE is set to force (in which case SSH_ASKPASS is called even when DISPLAY is not set).

On macOS Monterey 12.3 (that's the version of macOS I'm using) the DISPLAY env-var is not set by default.

So, if using password-protected ssh-key, and it is not added to the ssh-agent when performing connection to the repo with Sublime Merge it causes "Permission denied / Could not read from remote repository" error.

I suppose that was the core issue of at least some previous reports of the issue (e.g., #498, #608, and multiple reports on forum.sublimetext.com).

Preferred solution

Either set DISPLAY environment variable to any non-null value or SSH_ASKPASS_REQUIRE=force when calling git from Sublime Merge.

Screenshots

Screen Shot 2022-03-21 at 23 12 17

ffuugoo avatar Mar 21 '22 22:03 ffuugoo