Github SSH auth fails when pushing from a container using VS Code with Remote Containers plugin on Windows

Erik Martines Sanches 31 Reputation points
2021-07-16T18:43:11.717+00:00

I'm rather new to containerization. I have used Windows Subsystem for Linux 2 (WSL) to make an image containing for example Debian and Node JS. I've followed these steps to Add a new SSH Key to Your GitHub Account to add a (private) SSH key inside the container (and add that public key to my GitHub account). Was it right to do that inside the container, basically using the terminal in VS Code?

I was able to pull and use this image on MacOS and was able to use the Source Control tab within VS Code (Running Remote-Development Plugin and opened my GitHub repository in my docker container.)

However on Windows, I am unable to use the Source Control tab in VS Code (while running connected to the dev container) for pulling and pushing. I receive the following error.

115531-skarmbild-2021-07-16-204731.png

I am able to push and pull if I use the terminal, rather than the UI, and provide the password for the SSH key. How do I make it not require this, as in MacOS?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
39,197 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.