# NousResearch/hermes-agent · Stale GitHub token in .env overrides working gh CLI auth

## Open now

- Nothing open on GitHub.

A bug where an expired GITHUB_TOKEN/GH_TOKEN in .env silently takes precedence over a valid gh CLI credential, blocking private clones. Related items address detection, validation against api.github.com, and fallback behavior.

## TL;DR

- 4 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 2 merged PR(s), 1 PR(s) closed without merging.
- A fix was merged to main in PR #116985. Verify it addresses your case.
- **Recommended:** read PR #116985 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `resolved` · deciding PR(s): `pr-116813`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_SPANNING`): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
- Pairwise link density `0.50`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Closed / duplicate issues

- #115257: \[Bug\]: an expired GITHUB_TOKEN/GH_TOKEN in .env silently wins over the working gh CLI credential for all hermes git auth

## Prior & competing PRs

- **#116813: fix(git-auth): an expired GITHUB_TOKEN in .env yields to the gh CLI login instead of failing private clones (#115257, salvage #115265)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `hermes_cli/git_credentials.py`, `tests/hermes_cli/test_plugin_private_repo_auth.py`
- **#116985: fix(doctor): hermes doctor validates GITHUB_TOKEN/GH_TOKEN against api.github.com and names the .env file carrying an expired token (#115257)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `hermes_cli/doctor_connectivity.py`, `hermes_cli/doctor_state.py`, `tests/hermes_cli/test_doctor_github_token_probe.py`, `website/docs/user-guide/features/plugins.md`
- **#115265: A stale GITHUB_TOKEN in .env no longer blocks private plugin/MCP/profile clones when gh auth login works (#115257)**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `5c44d5df9ce7`, `#116813`, `#115257`, `#115265`

## Fix status

- Merged to main in PR #116985 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-09-20`.
