Skip to content

fix: environment variables not available in VSCode Remote terminals#93

Merged
gricha merged 1 commit intogricha:mainfrom
adek05:fix/vscode-remote-env-vars
Jan 11, 2026
Merged

fix: environment variables not available in VSCode Remote terminals#93
gricha merged 1 commit intogricha:mainfrom
adek05:fix/vscode-remote-env-vars

Conversation

@adek05
Copy link
Copy Markdown
Contributor

@adek05 adek05 commented Jan 11, 2026

Summary

  • Add /etc/environment support for environment variables in all session types
  • Write env vars before starting sshd in container entrypoint
  • Sync env vars when credentials are updated via API
  • Fixes VSCode Remote terminals not having access to GITHUB_TOKEN and other secrets

Test plan

  • Build workspace image with changes
  • Create test workspace with configured secrets
  • Verify env vars available in SSH sessions
  • Verify env vars available in VSCode Remote terminals
  • Verify credential sync updates /etc/environment

VSCode Remote terminals do not inherit environment variables from PID 1,
causing secrets like GITHUB_TOKEN to be unavailable. This broke git operations
and other commands that rely on these credentials.

Write environment variables to /etc/environment before starting sshd, using
PAM's pam_env module to inject them into all session types. Credentials are
synced both at container startup and when updated via the API.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@gricha gricha merged commit 5e539c6 into gricha:main Jan 11, 2026
7 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants