Skip to content
Docs

Secrets and Auth

CodeForge supports automatic authentication through .devcontainer/.secrets and DevContainer-hosted secrets such as Codespaces secrets.

Create .devcontainer/.secrets with KEY=VALUE entries:

Terminal window
GH_TOKEN=ghp_your_token_here
GH_USERNAME=your-github-username
GH_EMAIL=your-email@example.com
NPM_TOKEN=npm_your_token_here
CLAUDE_AUTH_TOKEN=sk-ant-oat01-your-token-here
OPENAI_API_KEY=sk-your-openai-key
VariablePurpose
GH_TOKENGitHub CLI and HTTPS git auth
GH_USERNAMEGit user name
GH_EMAILGit user email
NPM_TOKENnpm auth
CLAUDE_AUTH_TOKENClaude Code long-lived auth token
OPENAI_API_KEYCodex CLI API-key auth
  • CodeForge can inject Claude and Codex credentials on container start.
  • Codespaces or other host secrets take precedence over .secrets.
  • Existing credentials are usually left in place when the setup is idempotent.

Never commit .devcontainer/.secrets.

If something is not authenticated, these commands are the fastest first checks:

Terminal window
gh auth status
claude
codex
npm whoami