Blocked as auth fails whenever -p or --agent used (enterprise login)
Nessuno ha ancora preso questa issue.
- Lingua principale
- Shell
- Stelle
- 11.2k
- Fork
- 1.9k
- Merge medio
- 14h 16m
- PR unite (30g)
- 6
Descrizione
Describe the bug
copilot fails to load due to auth issues when using -p --agent:
copilot -p "hello"
...worked fine.
Then if you run this, with --agent, it breaks:
copilot -p "hello" --agent my-agent
! Third-party MCP servers are disabled by your organization's Copilot policy. Only built-in servers are available.
Error: Authentication failed (Request ID: 2915:A0B85:4D563A2:5BD65FE:6A915A71)
Your GitHub token may be invalid, expired, or lacking the required permissions.
To resolve this, try the following:
• Start 'copilot' and run the '/login' command to re-authenticate
• If using a Fine-Grained PAT, ensure it has the 'Copilot Requests' permission enabled
• If using COPILOT_GITHUB_TOKEN, GH_TOKEN or GITHUB_TOKEN environment variable, verify the token is valid and not expired
• Run 'gh auth status' to check your current authentication status
And further more, once you do the above, then:
copilot -p "hello"
...is permanently broken too now with the same error as above, despite working moments before. Strange.
It's enterprise, so we are logged in via ghe.com.
Running a regular "copilot" is fine.
Version: 1.0.81
Can you please fix this latest blocking login bug. There should be no differing auth code paths just because of a -p or --agent parameter.
I suspect you've hardcoded or chosen api.githubcopilot.com incorrectly again (if so, please add some effective guardrails to prevent this, this is a repeated root cause of various login issues).
Affected version
No response
Steps to reproduce the behavior
No response
Expected behavior
No response
Additional context
No response
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.
Direzione di ricerca
Inizia riproducendo il problema con la CLI copilot usando -p, --agent e il comando /login in un ambiente Enterprise ghe.com; confronta il comportamento con un’esecuzione interattiva di copilot e controlla gh auth status. Il lavoro è completato quando sia -p sia --agent usano il corretto percorso di autenticazione Enterprise senza compromettere i comandi successivi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- github, shell
- Ambito
- authentication, cli
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Attiva
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 42/100