Fix ‘ssh_askpass No Such File or Directory’ Error When Pushing to Git Repo Using VS Code

19.10gitgithubsshvisual-studio-code

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.
Screenshot of the error message.

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

Best Answer

I had to do 2 things to get this solved.

  1. As @Wan-Chap said above

     sudo apt install ssh-askpass
    
  2. Use this command to add bitbucket.org (In my case it was Bitbucket)

     ssh-keyscan -t rsa bitbucket.org >> ~/.ssh/known_hosts
    
Related Question