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

Git permission issue in Dev Container? #4090

Closed
jonnyry opened this issue Sep 10, 2024 · 5 comments
Closed

Git permission issue in Dev Container? #4090

jonnyry opened this issue Sep 10, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@jonnyry
Copy link
Collaborator

jonnyry commented Sep 10, 2024

Recently built a fresh Dev Container in VS Code (on Windows) and now seeing the following error when trying to use Git CLI from within the container:

image

I have manually added an exception, but just wanted to raise it as I've not seen it before when building the Azure TRE Dev Container, and wondered whether anyone else had seen it?


This provides a bit of background on Dev Containers & the error in git...

https://www.kenmuse.com/blog/avoiding-dubious-ownership-in-dev-containers/

@marrobi
Copy link
Member

marrobi commented Sep 10, 2024

@tim-allen-ck hit it last week I think. Didn't consider that it would be a Dev Container issue.

@tim-allen-ck tim-allen-ck added the bug Something isn't working label Sep 10, 2024
@tim-allen-ck
Copy link
Collaborator

me either, I assumed it was me

@jonnyry
Copy link
Collaborator Author

jonnyry commented Sep 10, 2024

Glad it's not just me :-)

Wonder if its worth sticking the following in devcontainer.json as per that kenmuse.com link above?

"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",

@a-illarionov
Copy link

a quick workaround is using "sudo -s" running it again and then running the rest in parts...

@jonnyry
Copy link
Collaborator Author

jonnyry commented Dec 5, 2024

No longer occuring with a freshly built container on the current version of main.

@jonnyry jonnyry closed this as completed Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants