microsoft / microsoft/vscode-remote-release
Option to remove git credential config options from global git config in devcontainer
@chrmarti is already working on this.
Since Dec 20, 2024.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.