hermes - 💡(How to fix) Fix [Desktop] Tools & Keys → GitHub shows 'Internal server error' when saving/removing classic PAT (ghp_*) [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

The Hermes Desktop Tools & Keys → GitHub settings page cannot save or remove a GitHub token, and shows a generic "Internal server error" when trying to do so. Actual result: Failed to add GITHUB_TOKEN / Internal server error Expected result: Token accepted and saved, or a clear error message explaining why it was rejected. The error is caught without a human-readable message and surfaces as a generic "Internal server error" in the UI.

  • Users trying to add a token through the UI for the first time get an unhelpful error with no guidance on what token type to use
  • This issue is about the Desktop settings UI error handling specifically — even if Copilot rejects classic PATs, the UI should show a human-readable message instead of "Internal server error"

Root Cause

The Desktop settings backend validates the token against the Copilot API, which only accepts fine-grained PATs (github_pat_*) or OAuth tokens (gho_*). Classic PATs (ghp_*) are rejected by the Copilot API but are still valid for the GitHub REST API (issues, PRs, forks) and Skills Hub rate limiting.

The error is caught without a human-readable message and surfaces as a generic "Internal server error" in the UI.

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Problem

The Hermes Desktop Tools & Keys → GitHub settings page cannot save or remove a GitHub token, and shows a generic "Internal server error" when trying to do so.

Steps to reproduce

  1. Open Hermes Desktop → Settings → Tools & Keys → GitHub
  2. Paste a classic GitHub Personal Access Token (ghp_...) into the token field
  3. Click save

Actual result: Failed to add GITHUB_TOKEN / Internal server error Expected result: Token accepted and saved, or a clear error message explaining why it was rejected.

Root cause

The Desktop settings backend validates the token against the Copilot API, which only accepts fine-grained PATs (github_pat_*) or OAuth tokens (gho_*). Classic PATs (ghp_*) are rejected by the Copilot API but are still valid for the GitHub REST API (issues, PRs, forks) and Skills Hub rate limiting.

The error is caught without a human-readable message and surfaces as a generic "Internal server error" in the UI.

Impact

  • Users who manually add GITHUB_TOKEN to their ~/.hermes/.env file (the recommended method) see the token detected (green indicator light in the UI) but cannot remove or replace it through the UI
  • Users trying to add a token through the UI for the first time get an unhelpful error with no guidance on what token type to use
  • The UI should either accept classic PATs (validating against the REST API instead of Copilot) or clearly explain the token type requirement

Related

  • #13988 — tracks Copilot auth rejecting classic PATs (validation layer)
  • This issue is about the Desktop settings UI error handling specifically — even if Copilot rejects classic PATs, the UI should show a human-readable message instead of "Internal server error"

Suggested fix

The Desktop settings page should either:

  1. Validate against the GitHub REST API (https://api.github.com/user) instead of the Copilot API — both token types work here
  2. Or catch the Copilot rejection and display a meaningful message: "Classic personal access tokens (ghp_) are not supported. Use a fine-grained PAT (github_pat_) with Copilot Requests permission, or run gh auth login."

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING