[BUG] git-subdir plugin source resolves owner/repo shorthand to SSH while github sources use HTTPS

Status Open
Reported on v2.1.299
Maintainer reply None cached
Activity 0 comments · opened Oct 14, 2026

What's wrong

In Claude Code 2.1.299, a git-subdir plugin source resolves GitHub owner/repo shorthand to SSH (git@github.com:…), while a github source resolves the same shorthand to HTTPS. Without SSH set up, as on CI runners and fresh machines, the documented git-subdir shorthand fails to install.

The marketplace reference says a git-subdir "url accepts a full git URL or GitHub owner/repo shorthand" (https://code.claude.com/docs/en/plugins/marketplace-reference#git-subdir-plugin-source) and says nothing about SSH.

Related: #26588 asks for HTTPS by default in general. github sources now do; git-subdir shorthand doesn't.

Expected

"url": "owner/repo" in a git-subdir source clones https://github.com/owner/repo.git, the same as "repo": "owner/repo" in a github source.

Repro

Clean environment: HOME set to an empty directory (no SSH keys, no gh config), GIT_CONFIG_GLOBAL=/dev/null, GIT_CONFIG_NOSYSTEM=1, a fresh CLAUDE_CONFIG_DIR. Clone URLs from GIT_TRACE=1:

| Entry | Cloned | Result |
| --- | --- | --- |
| {"source": "github", "repo": "ANcpLua/ancplua-lean-proof"} | https://github.com/ANcpLua/ancplua-lean-proof.git | installs |
| {"source": "git-subdir", "url": "ANcpLua/mcp-builder-v2", "path": "plugins/mcp-builder-v2"} | git@github.com:ANcpLua/mcp-builder-v2.git | fails: Failed to clone repository for git-subdir source: … Host key verification failed. |

The marketplace reference says a git-subdir "url accepts a full git URL or GitHub owner/repo shorthand" (https://code.claude.com/docs/en/plugins/marketplace-reference#git-subdir-plugin-source), so the shorthand should behave like the github source and use HTTPS.

Repro:

{ "name": "subdir-repro", "owner": { "name": "repro" }, "plugins": [
  { "name": "mcp-builder-v2", "source": { "source": "git-subdir", "url": "ANcpLua/mcp-builder-v2", "path": "plugins/mcp-builder-v2" } },
  { "name": "ancplua-lean-proof", "source": { "source": "github", "repo": "ANcpLua/ancplua-lean-proof" } } ] }
claude plugin marketplace add ./subdir-repro
GIT_TRACE=1 claude plugin install mcp-builder-v2@subdir-repro      # exit 1, git@github.com:…
GIT_TRACE=1 claude plugin install ancplua-lean-proof@subdir-repro  # exit 0, https://github.com/…

Workaround: write the full https://github.com/owner/repo.git URL in the git-subdir url. It installs on a GitHub Actions ubuntu runner too.

Environment

  • Claude Code 2.1.299
  • macOS (Darwin 27.0.0)
  • No git url.*.insteadOf rewrites; the SSH URL appears with global and system git config disabled

View original on GitHub ↗