Hey, this is a known bug in the Dev Containers extension when using SSH remote. The same error was reported in this thread Dev Containers: can not attach to remote container and here Remote dev for container fail to open. The issue is that the extension can’t figure out the home directory on the remote host when it tries to read .gitconfig.
A workaround that sometimes helps is to make sure the SSH remote host, not the container, has a .gitconfig and that $HOME is set correctly:
echo $HOME
ls -la ~/.gitconfig
# If the file doesn't exist:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
To be honest, for some users this workaround doesn’t help because the root issue is in the extension itself. The team is aware, but there’s no ETA for a fix yet. I passed along another signal, your report helps with prioritization.
Let me know if the workaround helped.