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

Option to remove git credential config options from global git config in devcontainer #10587

Open
MartinLoeper opened this issue Dec 20, 2024 · 0 comments
Assignees
Labels
containers Issue in vscode-remote containers

Comments

@MartinLoeper
Copy link

I do not know if this was previously discussed here in the issues. If so, feel free to close.

The devcontainers extension forwards the git credentials configuration by creating the following config in my devcontainer's global git config:

[credential]
	helper = "!f() { /home/vscode/.vscode-server/bin/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/node /tmp/vscode-remote-containers-1ed05baf-189c-413c-bec8-ff77cfbb3f87.js git-credential-helper $*; }; f"

However, when I have custom global git configs á la:

[credential "https://mydomain.org"]

they are retained in the global git config.

However, the paths to the git-credentials plugins referenced there are not accessible from within the devcontainer.

Is there an option to make the devcontainer remove these other git credential configurations from global git config file?
If not, is there a good reason not to remove them?

And lastly: Is there an easy way to script the removal of these sections? I'm thinking of something like a postCreate hook in devcontainer.json or so.

Example error message which is from my NixOS devcontainer setup each time I pull or push something:

/nix/store/3fvqdfrjv01vgh5j22yigsbkynv2sqw2-git-credential-manager-2.5.1/bin/git-credential-manager store: 1: /nix/store/3fvqdfrjv01vgh5j22yigsbkynv2sqw2-git-credential-manager-2.5.1/bin/git-credential-manager: not found
@vs-code-engineering vs-code-engineering bot added the containers Issue in vscode-remote containers label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
containers Issue in vscode-remote containers
Projects
None yet
Development

No branches or pull requests

2 participants