Skip to content

[Dev Containers] Understand GCM forwarding mechanism #9743

Closed
@sam-mfb

Description

@sam-mfb

One of the great things about the Dev Containers extension to VS Code versus just "rolling your own" docker image and developing inside it is how Dev Containers seamlessly transfers your git configuration including the git credential manager (GCM) host settings. Being able to develop in a linux container but still rely on GCM on the host, especially for things like FIDO2 and secure storage, is really amazing. Without VS Code Dev Containers you are stuck installing GCM in your linux container which is not easy to get working with an oauth2 flow, especially with FIDO2. (It's doable but you have to use deviceflow and you are still going to have issues with secure storage of the token.)

This has, however, lead to a little bit of antipattern where some developers (myself included) will use VS Code to work in a container even when we don't need (or even want) all the extras VS Code offers, solely to take advantage of gcm forwarding.

I would love a way to do GCM forwarding in any docker container. That's not at all related to this project -- but here is my question that is related:

Would the devs here be willing to share any info on how this is done? Ideally code (or pointers to relevant code), but really even any comments to help me get moving in the right direction would be awesome.

If this type of question is inappropriate for this board, my apologies and feel free to close.

Metadata

Metadata

Assignees

Labels

containersIssue in vscode-remote containersunder-discussionIssue is under discussion for relevance, priority, approach

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions