Skip to content

/plugin install fails with shallow clone when ref is fully-qualified (refs/tags/<tag>) #3437

Description

@dfrysinger

Summary

/plugin install <plugin>@<marketplace> fails to fetch any plugin whose marketplace entry points at a tagged release, because the installer passes a fully-qualified ref to git clone --depth 1 --branch, which git rejects.

Repro

/plugin install pm-skills@awesome-copilot

Observed

✗ Failed to install plugin: Failed to fetch GitHub plugin Avyayalaya/pm-skills-arsenal:
Error: Command failed: git clone --depth 1 --progress --branch refs/tags/v2.1.0 \
  https://github.com/Avyayalaya/pm-skills-arsenal.git \
  /Users/<user>/Library/Caches/copilot/marketplaces/Avyayalaya--pm-skills-arsenal
fatal: Remote branch refs/tags/v2.1.0 not found in upstream origin

The tag exists — git ls-remote --tags https://github.com/Avyayalaya/pm-skills-arsenal.git shows refs/tags/v2.1.0.

Root cause

git clone --depth 1 --branch <ref> requires a short ref name (e.g. v2.1.0), not a fully-qualified one (refs/tags/v2.1.0). The shallow upload-pack protocol only advertises short names to --branch.

Reproduction:

# fails
git clone --depth 1 --branch refs/tags/v2.1.0 https://github.com/Avyayalaya/pm-skills-arsenal.git
# fatal: Remote branch refs/tags/v2.1.0 not found in upstream origin

# succeeds
git clone --depth 1 --branch v2.1.0 https://github.com/Avyayalaya/pm-skills-arsenal.git

Suggested fix

Strip the refs/tags/ (and refs/heads/) prefix before passing the value to --branch, or omit --depth 1 when a fully-qualified ref is needed.

Affected version

GitHub Copilot CLI 1.0.51-2

Environment

  • OS: macOS (Darwin, arm64)
  • git: system default

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:pluginsPlugin system, marketplace, hooks, skills, extensions, and custom agents

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions