github / github/copilot-cli

App: "failed to browse marketplace" error toast for already-installed plugins from private SSO repos

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

Description

### Describe the bug

Opening **Settings → Plugins** in the GitHub Copilot app (the desktop app built on the Copilot CLI) shows an error toast **"failed to browse marketplace ``"** for marketplaces that are registered from **private repositories in an SSO-enforced org** — even when the plugin from that marketplace is **already installed and enabled and working**.

Under the hood, browsing/refreshing a marketplace runs `git clone --depth 1 --progress `. For a private repo in an SSO-enforced org (here `github/pm-booster-pack` and `github/qubot`, both private in the `github` org), that clone fails in the app's git credential context — while the standalone Copilot CLI clones the same repos fine because it uses the user's `gh` token, which **is** SSO-authorized for the org. So GitHub API access works, but the app's `git clone` does not.

The result is a misleading error that signals "something is broken" to end users, even though the installed plugin loads and runs normally (it's available via `/agent`). This forces plugin authors to **unregister their marketplace after install** (strip `extraKnownMarketplaces` from `settings.json`) as a workaround to keep the app's Plugins panel quiet — which then breaks `copilot plugin update` until the marketplace is re-added.

There are two distinct issues here:

1. **Graceful degradation (CLI/marketplace layer):** A marketplace browse/refresh that fails to `git clone` a private/SSO repo should degrade gracefully (skip/queue that marketplace, surface an actionable "needs SSO authorization" hint), not hard-fail the panel.
2. **UX (app layer):** Don't surface a blocking *error* toast for a marketplace refresh failure when the affected plugin is **already installed and enabled**. Demote to a quiet, dismissible warning, and ideally include the real cause (org SSO not authorized for the app's git credential).

### Affected version

GitHub Copilot CLI 1.0.66-0 (GitHub Copilot app build)

### Steps to reproduce the behavior

1. Publish a Copilot CLI plugin via a `marketplace.json` in a **private** repo that belongs to an **SSO-enforced org** (e.g. `github/`).
2. In the Copilot CLI, register + install it: `copilot plugin marketplace add github/` then `copilot plugin install @`. The plugin installs and works.
3. Open the **GitHub Copilot app** → **Settings → Plugins**.
4. Observe the toast: **"failed to browse marketplace ``"**, even though the plugin is installed/enabled and usable via `/agent`.

### Expected behavior

- A marketplace whose backing repo can't be cloned by the app should **not** produce a blocking error toast when its plugin is already installed and enabled.
- The failure should degrade gracefully and, where possible, explain the real cause (e.g. "the app's GitHub credential isn't SSO-authorized for org `X`; authorize it to browse this private marketplace") rather than a generic "failed to browse marketplace."
- Already-installed/enabled plugins should continue to work and be clearly distinguished from the (failed) browse/discovery catalog.

### Additional context

- **Root cause:** the app's `git clone --depth 1 --progress` of the private marketplace repo fails because the app's git credential context is **not SSO-authorized** for the `github` org; the standalone CLI works because it uses the user's `gh` token (SSO-authorized). API calls succeed, the clone does not.
- Both registered private marketplaces (`github/pm-booster-pack`, `github/qubot`) fail identically — so it's not specific to one repo's `marketplace.json` location (one uses `.github/plugin/`, the other `.claude-plugin/`); the common factor is **private repo + org SSO**.
- **Current workaround (undesirable):** unregister the marketplaces after install (remove `pm-tools`/`qubot` from `extraKnownMarketplaces` in `~/.copilot/settings.json`). The installed plugins keep working from disk + `enabledPlugins`, and the toast disappears — but `copilot plugin update` then fails with "Marketplace not found" until the marketplace is re-added.
- Operating system: macOS 26.5.1, arm64
- Surfaces affected: GitHub Copilot app **Settings → Plugins** (the standalone CLI is unaffected).

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start at the GitHub Copilot app's Settings → Plugins flow and trace its marketplace browse/refresh entry point into the CLI marketplace layer. Reproduce with a private SSO-enforced repository and compare the app's git clone context with the standalone `copilot plugin marketplace add` flow. Done means installed plugins remain usable without a blocking toast, and browse failures are handled with an actionable status.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
git, github, shell
Domaine
authentication, cli, desktop
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
48/100

Recevez les nouvelles issues par e-mail

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