obsidian-git
obsidian-git copied to clipboard
[Bug]: ssh_askpass: exec(/usr/X11R6/bin/ssh askpass): No such file or directory Permission denied, please try again.
Describe the bug
After changing my remote origin from https to ssh (same repo), I get the attached error message.
Using git push
via terminal in the same directory works as intended.
Relevant errors (if available)
ssh_askpass: exec(/usr/X11R6/bin/ssh
askpass): No such file or directory
Permission denied, please try again.
ssh_askpass: exec(/usr/X11R6/bin/ssh
askpass): No such file or directory
Permission denied, please try again.
ssh_askpass: exec(/usr/X11R6/bin/ssh
askpass): No such file or directory
[email protected]:
Permission denied
(publickey,password).
fatal: Could not read from remote
repository.
Please make sure you have the correct
access rights
and the repository exists.
Steps to reproduce
chose git backup
or git push
from the git plugin
Expected Behavior
No response
Addition context
No response
Operating system
macOS
Plugin version
1.26.1
A workaround it to just link your ssh-askpass to the location that obsidian-git is looking at.
sudo ln -s $(which ssh-askpass) /usr/X11R6/bin/ssh-askpass
if you don't have a ssh-askpass executable then you might need to install it through brew, I'm not sure if it comes pre-installed. This worked for me on Mac M1 12.4
Mine is giving this error with ksshaskpass, but my file exists in the folder.
A workaround it to just link your ssh-askpass to the location that obsidian-git is looking at.
sudo ln -s $(which ssh-askpass) /usr/X11R6/bin/ssh-askpass
if you don't have a ssh-askpass executable then you might need to install it through brew, I'm not sure if it comes pre-installed. This worked for me on Mac M1 12.4
This did not work for me as X11R6
only exists as a symbolic link itself pointing to a X11
folder that itself is not present.
X11R6 -> ../private/var/select/X11
An ugly workaround would probably be to remove the passphrase from the SSH-key.
@NaBuchholz Have you installed Obsidian via Flatpak? May you try AppImage?
I have a very similar issue on flatpak installations, but it complains about ksshaskpass
(I'm on kde plasma).
Via AppImage I don't have this issue.
I have 2 workarounds for dealing with this issue on flatpak:
- launch obsidian through console (
flatpak run md.obsidian.Obsidian
). It will be able to prompt you for the private key. I've no idea why it works, though. - A bit more convoluted but works without opening from cli:
- first, add/edit your git provider section on
~/.ssh/config
:
Host github
User git
Hostname github.com
IdentityFile <path/to/privatekey>
IdentitiesOnly yes
AddKeysToAgent yes
- once per session, you need to run
ssh-add <path/to/privatekey>
- finally, launch the application from the applications launcher
Great it works via AppImage or with workarounds for Flatpak.