github / github/copilot-cli

Improve workflow for minimal auth scope vs gh auth login (via /login)

Ouverte
#1,460 0 commentaires 4 réactions 0 personnes assignées Voir sur GitHub
area:authentication area:enterprise
Langage dominant
Shell
Étoiles
11.2k
Forks
1.9k
Merge moyen
14 h 16 min
PR mergées (30 j)
6

Description

### Describe the feature or problem you'd like to solve

There is no easy way to authenticate Copilot CLI with minimal, scoped permissions in isolated environments. The `gh auth login` device code flow only adds to existing scopes and does not support per-repo granularity. A `/login` command or similar mechanism that supports scoped auth would reduce the need for workarounds.

This is especially important when running Copilot CLI in isolated environments with YOLO mode.

### Proposed solution

**Current workaround:** Create a Fine-grained Personal Access Token with `User: Copilot` and `Repository: Contents (read/write)` permissions, then authenticate with `gh auth login --with-token` or pass in `GH_TOKEN` env var.

### Example prompts or workflows

_No response_

### Additional context

_No response_

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.