Linux ssh-agent/ssh-askpass problem
See original GitHub issueAs already reported in #33814, #32097, #52137 the bug isn’t fixed for me and the workarounds don’t work either
VSCode Version: 1.26.1
OS Version: Ubuntu 16.04
Date: 2018-08-16T18:34:20.517Z
Electron: 2.0.5
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64
Shell: zsh
Steps to Reproduce:
- Open a Git repo folder
- Call a Git action like sync, push etc
Does this issue occur when all extensions are disabled?: Yes
I’m using ssh-agent to keep all my keys opened and enter the passwords after I boot (ssh-add ~/.ssh/id_rsa
). I can use git from the terminal without any problems, but “use the terminal then” is not a valid workaround for me when a whole feature doesn’t work.
I’ve set some configs in my ~/.ssh/config file as well
Host *
ServerAliveInterval 60
AddKeysToAgent yes
IdentityFile ~/.ssh/id_rsa
Host gitlab.com
HostName gitlab.com
User git
Host github.com
HostName github.com
User git
But it still get this error when using a feature that calls a remote git action:
> git pull --tags origin master
ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists
I already tried installing ssh-askpass with sudo apt-get install ssh-askpass-gnome ssh-askpass
but he asks me every single time for a password, so the ssh-agent is ignored
Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:29 (7 by maintainers)
Top GitHub Comments
Hello i had same problems with Code - OSS on Manjaro
I use Manjaro with KDE and he provide ksshaskpass i have simply create a symbolic link to his binary with and it’s work
sudo ln -s /usr/bin/ksshaskpass /usr/lib/ssh/ssh-askpass
I also tried openssh-askpass
sudo ln -s /usr/bin/qt4-ssh-askpass /usr/lib/ssh/ssh-askpass
They are cool because may integrate better into the desktop environments.
In my tests only x11-ssh-askpass automatically create “/usr/lib/ssh/ssh-askpass”
Look the packages in your distribution i think you can find same packages
But i don’t understand why VSCode could not use ssh-agent to not ask password at each push/pull maybe an other bug because i haven’t this problems on windows
In our screen sharing session we figured out what was happening:
@derN3rd uses i3 with rofi. He launches
code
from rofi, which finds executables in thePATH
. Code sets up the CLI launcher executable in the PATH, so rofi picks that one up. This is problematic since we never expected the CLI launcher executable to be launched in a non-shell environment, i.e. window managers. So, the CLI launcher behaves as if it was in a shell environment and doesn’t run ourgetUnixShellEnvironment
. The result is a Code instance which never got the chance to execute (in this case).zshrc
. So, the SSH agent is improperly configured.For a fix, we need to have a better way for whatever process we put in the PATH to detect whether it is already in an environment which was populated with the user’s RC files (whether it is a descendant of a shell process).