Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.gitconfig not copied to remote container #6124

Closed
slaytanic opened this issue Jan 3, 2022 · 6 comments
Closed

.gitconfig not copied to remote container #6124

slaytanic opened this issue Jan 3, 2022 · 6 comments
Assignees
Labels
containers Issue in vscode-remote containers info-needed Issue requires more information from poster

Comments

@slaytanic
Copy link

I'm using devcontainers with Docker on Windows, according to the documentation at https://code.visualstudio.com/docs/remote/containers#_sharing-git-credentials-with-your-container it says .gitconfig is copied from the host, this does not seem to be the case when using Git for Windows at least which stores .gitconfig in C:\Users\<username>

  • VSCode Version: 1.63.2
  • Local OS Version: Windows 10.0.19044
  • Remote OS Version: mcr.microsoft.com/vscode/devcontainers/ruby:0-3
  • Remote Extension/Connection Type: Docker

Steps to Reproduce:

  1. Run inside a devcontainer
  2. .gitconfig is missing

Does this issue occur when you try this locally?: Yes
Does this issue occur when you try this locally and all extensions are disabled?: Yes

@github-actions github-actions bot added the containers Issue in vscode-remote containers label Jan 3, 2022
@chrmarti
Copy link
Contributor

chrmarti commented Jan 4, 2022

Could you rebuild the container and append the log from that? (F1 > Remote-Containers: Show Container Log)

@chrmarti chrmarti self-assigned this Jan 4, 2022
@chrmarti chrmarti added the info-needed Issue requires more information from poster label Jan 4, 2022
@slaytanic
Copy link
Author

Sure, here it is
devcontainer.log

@chrmarti
Copy link
Contributor

chrmarti commented Jan 5, 2022

Do you have "remote.containers.copyGitConfig" set to false either in the devcontainer.json or your user settings?

@slaytanic
Copy link
Author

Do you have "remote.containers.copyGitConfig" set to false either in the devcontainer.json or your user settings?

I don't, but I just noticed that on a different project it was working and at first I assumed it was because it was not using docker-compose, so I tried creating a new project with compose, and one without it and it works as expected on both.

nocomposetest.log
composetest.log

I'm not sure what could be making it skip that step on that other project. If you've got any other pointers on things to check I'd appreciate it, if not I guess it can be chalked off to something of the environment.

@chrmarti
Copy link
Contributor

chrmarti commented Jan 5, 2022

Maybe double-check your local home folder has a .gitconfig file. The only other way for there to be no output about it in the log seems to be when there is no such file locally.

@github-actions
Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@github-actions github-actions bot locked and limited conversation to collaborators Feb 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
containers Issue in vscode-remote containers info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants