microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.69k stars 296 forks source link

[Remote-SSH Bug]: .gitconfig not copied to remote machine #10290

Closed stefanrybacki closed 1 month ago

stefanrybacki commented 2 months ago

VSCode Version: 1.93.1 Local OS: Windows 11 Remote OS: Ubuntu 24.04

.gitconfig exists in local user folder on Windows side, but will not be copied to remote machine, leading to errors regarding not set user.name and user.email configuration when trying to commit something.

joshspicer commented 1 month ago

Are you using the Remote SSH extension or dev containers extension? The Remote-SSH extension doesn't copy anything (like gitconfig) over from the local machine to the remote machine. You'll have to set that up yourself on the remote

The Dev Containers extension performs limited syncing steps between the host and container. If this is what you're asking about, please provide your logs and ideally a minimal dev container configuration that we can use to repro on our side. Thanks!

stefanrybacki commented 1 month ago

I am using plain remote SSH. So it seems I am under the wrong impression that .gitconfig was supposed to be copied over. I think I read it somewhere though. May it as it be, if it is not supposed to copy I guess this issue can be closed. Thanks for looking into this.

joshspicer commented 1 month ago

Yes, we have this feature for containers. You may also be interested in the ForwardAgent feature of SSH (that this extension supports).