auth status misreports an inaccessible keyring as an invalid token
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- authentication, cli
Direzione di ricerca
Inizia dal percorso di autenticazione gh auth status e riproduci il problema da un contesto senza accesso alla sessione grafica, ad esempio un demone di sistema launchd. Traccia come un errore di autorizzazione del keyring diventa il messaggio di token non valido; il lavoro è completo quando lo storage inaccessibile viene segnalato correttamente e l’output indica GH_TOKEN o gh auth login --insecure-storage.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
When gh runs in an environment without access to the user's graphical session (for example, a system daemon on macOS), reading the auth token from the keyring fails with a permission error. gh auth status then reports "The token in default is invalid" and suggests re-authenticating — but re-authenticating can never succeed, because the token also cannot be stored in the keyring from that environment.
Affected version
gh version 2.97.0 (2026-07-31)
Steps to reproduce the behavior
- Log in to
ghnormally so the token is stored in the macOS keyring. - Run
gh auth statusfrom a context without access to the user's graphical session (e.g. a launchd system daemon, wherelaunchctl managernamereportsSystem). - Observe the misleading error.
Expected vs actual behavior
Expected: gh auth status should report that the keyring is inaccessible and suggest a workaround that works in that environment (e.g. set GH_TOKEN or use gh auth login --insecure-storage).
Actual: it reports "The token in default is invalid" and suggests re-authenticating, which cannot succeed.
Logs
github.com
X Failed to log in to github.com account aimkiray (default)
- Active account: true
- The token in default is invalid.
- To re-authenticate, run: gh auth login -h github.com
- To forget about this account, run: gh auth logout -h github.com -u aimkiray
- Lingua principale
- Go
- Stelle
- 46.3k
- Fork
- 9.1k
- Merge medio
- 1g 7h
- PR unite (30g)
- 76
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cli/cli
-
enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
more-info-needed needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
-
bug gh-pr priority-2
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
bug gh-pr priority-2
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
bug gh-auth priority-3
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Issue simili
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
microsoft/agent-framework-go#1179 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
[Bug]: OLLAMA_KEEP_ALIVE="5m" / "24h" crashes Ollama embedding and vision models with ValueError Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
infiniflow/ragflow#20223 · 1 reazione ·
-
bug needs triage pkg/translator/faro
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
open-telemetry/opentelemetry-collector-contrib#51484 · 1 commento ·