You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd add this somewhere in the Dockerfile instead of in the devcontainer.json and use system instead of global:
RUN git config --system --add safe.directory '*'
Reasons:
Adding it to the Dockerfile will solve the issue in a central place. It will also solve the same issue when the image is used on linux outside a devcontainer/VSCode/codespaces context. Eg: docker compose run dev
Using system will add the config to /etc/gitconfig. In case global is used it will be added to ~/.gitconfig. But this will make VSCode fail to share gitconfig / credentials.
Problem description and solution: https://www.kenmuse.com/blog/avoiding-dubious-ownership-in-dev-containers/
The text was updated successfully, but these errors were encountered: