I'm new to vscode + docker. I've followed some specific instructions to set up my vscode project by editing settings.json, devcontainer.json, docker-compose.yaml, etc., and I've managed to connect to a virtual machine, launch the web server on it and access it in my browser, to run SQL queries and terminal commands on this virtual machine from vscode. HOWEVER I cannot perform a git pull or commit.
To produce the problem:
- Ctrl-Shift-P to pull up command window in vscode
- select Git: Pull
- an error dialog appears, saying Git: Host key verification failed.
- click 'Show Command Output' and see the following:
> git pull --tags origin main
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I have searched for solutions and can't seem to solve the problem. I did stumble across this troubleshooting guide but much of it is greek to me. I did try running docker ps
on my workstation, which is running Ubuntu 20.04 and my workstation recognize the commmand:
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
If I run the same command on the virtual machine/container in vscode, it looks like the remote machine doesn't recognize the command:
$ docker ps
bash: docker: command not found
Any help would be much appreciated. I wonder if perhaps I might need to remove an entry from the known_hosts file on my workstation? Let me know if I need to provide more detail about the vs code configuration.