copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

"Failed to add marketplace: Failed to fetch git marketplace from the provided URL." when adding private marketplace hosted on non-GitHub Git host

Open rameier opened this issue 8 months ago • 2 comments

Describe the bug

Description

Adding a private Agent Plugin Marketplace hosted on a self-hosted GitLab instance works correctly in GitHub Copilot in VS Code but fails in Copilot CLI with the error:

**Failed to add marketplace: Failed to fetch git marketplace from the provided URL. Please verify that the URL and reference are correct. **

Affected version

GitHub Copilot CLI 1.0.12.

Steps to reproduce the behavior

  1. Host a valid plugin marketplace (with a marketplace.json at the repository root and with a marketplace.json unter .github/plugin) on a private, self-hosted GitLab instance (e.g. gitlab.example.com/org/my-marketplace).
  2. In VS Code — Open Copilot Chat → Settings (⚙) → Plugins → Browse Marketplace (+) → Enter the Git URL of the private marketplace → Confirm.
    • Result: The marketplace is fetched successfully, and its plugins are listed and installable. ✅
  3. In Copilot CLI — Run:
    copilot plugin marketplace add gitlab.example.com/org/my-marketplace
    
    • Result: Error — Failed to add marketplace: Failed to fetch git marketplace from the provided URL. Please verify that the URL and reference are correct. ❌

Expected behavior

The CLI should be able to add and fetch a private marketplace from a non-GitHub Git host, the same way VS Code does. If authentication is required, the CLI should prompt for credentials or reuse existing Git credentials.

Additional context

Environment

  • OS: Windows
  • Copilot CLI version: (latest as of 2026-03-30)
  • VS Code version: (latest as of 2026-03-30)
  • Git host: Self-hosted GitLab (private repository)
  • marketplace.json location: Repository root (also tried .github/plugin/)

Additional Context

  • The marketplace.json is valid and follows the documented schema. VS Code successfully parses and displays the plugins from the same repository.
  • The repository is accessible via Git (clone works with proper credentials).
  • It appears the CLI may not be handling authentication for non-GitHub Git hosts, or may not be looking for the marketplace.json in the same locations that VS Code checks (root vs. .github/plugin/).
  • This could also be related to the CLI only supporting github.com as a marketplace provider and not supporting arbitrary Git hosts.

rameier avatar Mar 30 '26 08:03 rameier

+1

It used to work in an older version (something like 1.0.6 or lower).

Since version 1.0.14 I get a more detailed error: Failed to add marketplace: Failed to fetch git marketplace from the provided URL. Please verify that the URL and reference are correct. Details: Error: Command failed: git clone --depth 1 --progress https://gitlab.example.com/users/sign_in

fatal: unable to update url base from redirection: asked for: https://gitlab.example.com/users/sign_in/info/refs?service=git-upload-pack redirect: https://gitlab.example.com/users/sign_in

The same error occurs when I try to install a plugin directly from the marketplace from a gitlab instance.

PaKu5 avatar Apr 01 '26 07:04 PaKu5

Bug is fixed in 1.0.15

It showed me that "owner" field was missing in my marketplace.json

FYI @PaKu5

rameier avatar Apr 02 '26 08:04 rameier