{"name":"GH_TOKEN","slug":"gh-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":"claude-code","path":"cloud-environments","title":"Configure cloud environments","documented":false},{"source":"claude-code","path":"interactive-mode","title":"Interactive mode","documented":false},{"source":"claude-code","path":"plugins\/host-marketplace","title":"Host and maintain a marketplace","documented":false},{"source":"claude-code","path":"plugins\/org","title":"Manage Claude Code plugins for your organization","documented":false},{"source":"claude-code","path":"sandboxing","title":"Configure the sandboxed Bash tool","documented":false},{"source":"claude-code","path":"self-hosted-environments-deploy","title":"Deploy self-hosted environments to production","documented":false},{"source":"claude-docs","path":"claude-science\/command-line-settings","title":"Command line settings","documented":false}],"docs_total":7,"gates":[],"related":[{"name":"GH_CONFIG_DIR","slug":"gh-config-dir","description":"Read as a pointer to GitHub CLI credentials: `<GH_CONFIG_DIR>\/hosts.yml`, alongside `~\/.config\/gh\/hosts.yml` and `$XDG_CONFIG_HOME\/gh\/hosts.yml`, is added to the credential file paths collected when Claude Code sets up the Bash sandbox for an evaluation shell grant. A relative value is an error (`GH_CONFIG_DIR holds a relative path`)."},{"name":"GH_ENTERPRISE_TOKEN","slug":"gh-enterprise-token","description":"Claude Code looks for a GitHub token in `GH_TOKEN`, `GITHUB_TOKEN` or enterprise variants, then falls back to `gh auth token`"},{"name":"GH_HOST","slug":"gh-host","description":"The help line for `--hostname <host>` now says \"as GH_HOST\" only in some cases instead of every time"},{"name":"GH_REPO","slug":"gh-repo","description":"When the GitHub CLI is missing, Claude Code can supply its own limited `gh` that runs `gh api` REST calls through the session's GitHub proxy"}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/gh-token","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}