microsoft / microsoft/vscode-remote-release
Feature Request: Support for Global Environment Variables / Secrets
@chrmarti is already working on this.
Since Apr 2, 2026.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Currently, when using Dev Containers locally, there is no native way to inject global environment variables or secrets across multiple projects. While GitHub Codespaces provides a "Secrets" feature that allows users to define environment variables once and have them available in every Codespace, local Dev Containers require hardcoding variables in devcontainer.json.
This becomes particularly problematic when using dotfiles. Many developers use dotfiles to automate their environment setup, but dotfiles often require API keys, tokens, or private configurations (e.g., ONEPASSWORD_TOKEN, AGE_PRIVATE_KEY, etc.). To keep these secure, we cannot commit them to the dotfiles repository.
I would like to propose a way to define Global Environment Variables in VS Code that are automatically injected into any Dev Container session.
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.