github / github/copilot-cli

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

Open
#3,950 0 comments 0 reactions 0 assignees View on GitHub
area:authentication area:plugins
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
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).

Contributor guide

Open the contributing guide

Research direction

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.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, github, shell
Domain
authentication, cli, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.