"ssh_askpass exec(/usr/libexec/openssh/ssh-askpass) no such file or directory" error when I try to push in Git repo using VS Code
Solution 1
Well, I think (& am 100%) I found my solution. If you use services like SSH keys, make sure you don't disable SSH Key Agent. It was a stupid mistake. A week ago, I tried to decrease my boot time by disabling all unwanted services that launch itself while booting. I read askubuntu post asked by someone to disable those services. Now I have realized it.
Lesson learned. Don't do anything which you know don't for sure. Try not to disable other startup services related to SSH if you depend on it. After enabling the service, you might have to reboot. Then you are good to go.
Solution 2
I had to do 2 things to get this solved.
-
As @Wan-Chap said above
sudo apt install ssh-askpass
-
Use this command to add bitbucket.org (In my case it was Bitbucket)
ssh-keyscan -t rsa bitbucket.org >> ~/.ssh/known_hosts
Solution 3
It seems your ssh-askpass is missing. Just re-install it by:
sudo apt install ssh-askpass
Related videos on Youtube
Pranav
A BCA student until 2019. A wanna-be developer for now. "Jack of everything, a master at none" for now.
Updated on September 18, 2022Comments
-
Pranav over 1 year
Don't know what happened. But all of sudden I can't push updates in GitHub. A month ago I used SSH keys to integrate VS Code with Github so that I do not have to type email & password every single time when I use to push updates to the Git repository.
I think BleachBit has deleted some important files and this is happening. But this is my wild guess. I can't confirm this. Because I didn't do anything other than that. VS Code used to work fine. Suddenly this is happening. I gotta be careful with Bleachbit if this is an act of Bleachbit.
Meanwhile, I am going nuts over for a week thinking how to solve this issue. If you had this issue, then do comment it out.
When I did
ls /usr/bin/ssh-askpass
, it say there is no file or folder. This might be the cause of the problem. But I do see these folders inside /usr/bin related to ssh:ssh ssh-add //is a file that supposed to be deleted when I unistalled ssh-askpass ssh-agent //is a file ssh-argv0 ssh-copy-id ssh-keygen ssh-keyscan
-
Pranav over 4 yearsI already tried this solution. This is not a standard mechanism to solve this problem. The whole idea of having SSH keys is to make VS code push updates without having to enter a password like 1000 times. This does solve the problem but it will ask password in each push to git repo.
-
efaruk almost 4 yearsinstead of ">" you should use ">>" to append otherwise it will overwrite existing known hosts, which might not be a desirable outcome...
-
antonD almost 4 years@efaruk Thanks for mentioning. I have updated.
-
Hartmut Pfarr over 2 yearsor invoke
ssh-add
once to get the agent running