{"name":"GITHUB_TOKEN","slug":"github-token","family":"env","title":"Environment variables","noun":"environment variable","description":"gh, aws, gcloud, bq and gsutil get placeholder credentials so they authenticate through the proxy instead of failing.","description_source":"entry","described_by":{"version":"2.1.239","anchor":"sandboxed-clis-get-placeholder-credentials-so-they-route-thr"},"presence":{"first_seen":"2.1.138","removed_in":null,"in_current_build":true,"newest_mined":"2.1.308","builds":149,"mined_builds":149,"first_cited":null},"aliases":[],"entries":[{"version":"2.1.299","anchor":"git-worktreecheckout-validation-reworked-github-token-reso","heading":"Claude Code can now find a GitHub token from your environment or the gh tool","line":"Claude Code looks for a GitHub token in `GH_TOKEN`, `GITHUB_TOKEN` or enterprise variants, then falls back to `gh auth token`","released_at":"2026-10-14 00:23:19","reason":"found in this entry's text"},{"version":"2.1.242","anchor":"placeholder-credential-values-for-the-gh-aws-and-gcloud-clis","heading":"Placeholder credential values for the gh, AWS and gcloud CLIs","line":"Stand-in credential values for gh, AWS and gcloud are defined, with substitution rules unsettled.","released_at":"2026-08-24 19:16:14","reason":"found in this entry's text"},{"version":"2.1.239","anchor":"sandboxed-clis-get-placeholder-credentials-so-they-route-thr","heading":"Sandboxed CLIs get placeholder credentials so they route through the agent proxy","line":"gh, aws, gcloud, bq and gsutil get placeholder credentials so they authenticate through the proxy instead of failing.","released_at":"2026-08-21 17:18:54","reason":"found in this entry's text"},{"version":"2.1.202","anchor":"agent-proxy-governed-git-and-github-gh-shim","heading":"Agent Proxy: Governed Git and GitHub (gh) Shim","line":null,"released_at":"2026-07-06 20:41:23","reason":"found in this entry's text"},{"version":"2.1.6","anchor":"git-token-injection-for-private-repository-cloning","heading":"Git Token Injection for Private Repository Cloning","line":null,"released_at":"2026-01-13 01:42:47","reason":"found in this entry's text"}],"entries_total":5,"docs":[{"source":"api","path":"api\/compliance","title":"Compliance API","documented":false},{"source":"api","path":"api\/compliance\/activities","title":"Activities","documented":false},{"source":"api","path":"api\/compliance\/activities\/list","title":"Query compliance activities","documented":false},{"source":"api","path":"cli-sdks-libraries\/cli\/apply","title":"apply","documented":false},{"source":"api","path":"managed-agents\/github","title":"github","documented":false},{"source":"api","path":"managed-agents\/skills","title":"skills","documented":false},{"source":"claude-code","path":"agent-sdk\/mcp","title":"Connect to external tools with MCP","documented":false},{"source":"claude-code","path":"cloud-environments","title":"Configure cloud environments","documented":false},{"source":"claude-code","path":"github-actions","title":"Claude Code GitHub Actions","documented":false},{"source":"claude-code","path":"github-actions-cloud-providers","title":"Use Claude Code GitHub Actions with cloud providers","documented":false}],"docs_total":12,"gates":[],"related":[{"name":"GITHUB_ACTION_INPUTS","slug":"github-action-inputs","description":"Claude Code logs whether `GITHUB_ACTION_INPUTS` is set and its length (`githubActionInputsPresent`, `githubActionInputsLength`) on the `tengu_init` analytics event. The value itself is not sent."},{"name":"GITHUB_ACTION_PATH","slug":"github-action-path","description":"When `GITHUB_ACTIONS` is true, the part of `GITHUB_ACTION_PATH` after `claude-code-action\/` is sent in analytics as `githubActionRef`. The path, and its prefix up to `\/_actions` when it contains `\/_actions\/`, are also on the write-deny list of the filesystem sandbox Claude Code builds for Bash commands under subprocess env scrubbing (`CLAUDE_CODE_SUBPROCESS_ENV_SCRUB`)."},{"name":"GITHUB_ACTIONS","slug":"github-actions","description":"CLAUDE_CODE_SUBAGENT_MODEL_FORCE joins a list of passed-on env vars, and RUNNER_ENVIRONMENT is added next to GITHUB_ACTIONS"},{"name":"GITHUB_ACTOR","slug":"github-actor","description":"When Claude Code is launched in diskless mode, your `statusLine` and `fileSuggestion` commands no longer run"},{"name":"GITHUB_ACTOR_ID","slug":"github-actor-id","description":"When `GITHUB_ACTIONS` is true, included as `actorId` in the GitHub Actions metadata Claude Code attaches to its analytics user data and events."},{"name":"GITHUB_ENTERPRISE_TOKEN","slug":"github-enterprise-token","description":"Fallback for `GH_ENTERPRISE_TOKEN`: the token Claude Code uses for GitHub API calls to a non-`github.com` host that matches `GH_HOST`, such as the pull request status lookup for the current branch. The auto-mode `gh` queries for repo visibility and branch protection run with it unset, and the agent-proxy `gh` shim runs the real `gh` directly, bypassing the session relay, when it is set."},{"name":"GITHUB_ENV","slug":"github-env","description":"When set, a path derived from it (the runner's file-commands location) is added to the write-deny list of the filesystem sandbox Claude Code builds for Bash commands under subprocess env scrubbing (`CLAUDE_CODE_SUBPROCESS_ENV_SCRUB`), so sandboxed commands cannot write there."},{"name":"GITHUB_EVENT_NAME","slug":"github-event-name","description":"When `GITHUB_ACTIONS` is true, sent in analytics as `githubEventName`."},{"name":"GITHUB_EVENT_PATH","slug":"github-event-path","description":"Read when subprocess environment scrubbing is on (`CLAUDE_CODE_SUBPROCESS_ENV_SCRUB`). The file it points at is added to the sandbox's `denyWrite` list, so commands Claude runs cannot modify the GitHub Actions event payload."},{"name":"GITHUB_REPOSITORY","slug":"github-repository","description":"When `GITHUB_ACTIONS` is true, included as `repository` in the GitHub Actions metadata of the analytics user data Claude Code builds."}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/github-token","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}