Skip to content

doctor warns missing GITHUB_TOKEN when gh CLI is authenticated #16115

@ai-era-agent

Description

@ai-era-agent

Bug Description

hermes doctor reports ⚠ No GITHUB_TOKEN (60 req/hr rate limit) even when the user has already authenticated via gh auth login.

Steps to Reproduce

  1. Authenticate with GitHub via gh auth login
  2. Run hermes doctor
  3. Observe the warning: ⚠ No GITHUB_TOKEN (60 req/hr rate limit — set in ~/.hermes/.env for better rates)

Expected Behavior

The doctor check should recognize that gh CLI authentication provides the same GitHub API access and either:

  • Show a success status (e.g., ✓ GitHub token available via gh CLI)
  • Not show a warning

Actual Behavior

It always warns about missing GITHUB_TOKEN in .env, even though gh auth token returns a valid token.

Root Cause

In hermes_cli/doctor.py (line ~1111), the check only looks for the GITHUB_TOKEN/GH_TOKEN environment variable:

github_token = get_env_value("GITHUB_TOKEN") or get_env_value("GH_TOKEN")

However, tools/skills_hub.py:_resolve_token() (line ~166) correctly falls back to gh auth token when the env var is not set. The doctor check is incomplete — it should also try gh auth token like the actual runtime code does.

Environment

  • OS: Linux
  • gh auth status: authenticated
  • No GITHUB_TOKEN in ~/.hermes/.env (by design — gh CLI auth is sufficient)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/cliCLI entry point, hermes_cli/, setup wizardtype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions