{"name":"GH_ENTERPRISE_TOKEN","slug":"gh-enterprise-token","family":"env","title":"Environment variables","noun":"environment variable","description":"Claude Code looks for a GitHub token in `GH_TOKEN`, `GITHUB_TOKEN` or enterprise variants, then falls back to `gh auth token`","description_source":"entry","described_by":{"version":"2.1.299","anchor":"git-worktreecheckout-validation-reworked-github-token-reso"},"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":{"version":"2.1.299","released_at":"2026-10-14 00:23:19","spans":1}},"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.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"}],"entries_total":2,"docs":[{"source":"claude-code","path":"interactive-mode","title":"Interactive mode","documented":false}],"docs_total":1,"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_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"},{"name":"GH_TOKEN","slug":"gh-token","description":"gh, aws, gcloud, bq and gsutil get placeholder credentials so they authenticate through the proxy instead of failing."}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/gh-enterprise-token","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}