devcontainers: run git on the host #54613
Replies: 2 comments 1 reply
-
|
I like this idea! The credentials in the container is an issue that have been bothering me for a while. In more sensitive projects I end up doing development through zed in the container, and then jump out to a normal terminal for git commit and push. For less sensitive stuff I just keep the credentials in the container. This feature would give me the best of both. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks! As an extension, IMHO a setting to move all write operations outside the container and make the workspace mount read-only would be helpful. Invariably my workspace ends up tainted due to UID mismatches between the host and container users, which is one of my biggest pain points with dev containers (even with VSCode). A read-only workspace mount would prevent the container from accidentally creating files that I need |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What are you proposing?
Let's add a config option for devcontainers that makes Zed run git commands on the host.
It could be a simple setting like:
Why does this matter?
Git operations are a recurring point of friction in devcontainers, e.g. #47121. The git setup of developers is often non-standard and in any case the git binary needs access to the users credentials (SSH / PGP). The official stance of the devcontainers maintainers seems to be:
Why is this problematic?
Are there any examples or context?
Here's the corresponding help page for VS Code. It's complicated to get this working and it needs to be redone for every container.
Possible approach
I think there might be a better solution: Perform your git operations on the host.
The credentials / config sharing problem doesn't exist under this setting.
If this is something Zed would be willing to support I can implement it 👍
Beta Was this translation helpful? Give feedback.
All reactions