[BUG] ssh:// git URLs rejected by plugin marketplace URL validator

Resolved 💬 3 comments Opened Mar 21, 2026 by gavingrey Closed Apr 18, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Code's git URL validator rejects ssh:// URLs (e.g., ssh://git.example.com:2222/path/to/repo) when re-caching plugins from a marketplace at session start. Bun's new URL() throws for the ssh: scheme, and the fallback only accepts git@host:path SCP-style SSH — which can't encode custom ports and requires the git username that many non-GitHub servers don't support. The initial install works fine (copies locally from the cloned marketplace directory), and git clone handles the URL correctly — only the re-caching validator rejects it.

What Should Happen?

ssh:// URLs should be accepted as valid git URLs. The validator should either accept ssh: as a valid protocol alongside https:, http:, and file:, or handle the Bun new URL() limitation for non-standard schemes (e.g., regex-match ssh:// URLs in the catch block, similar to how git@host:path is already handled there).

Error Messages/Logs

Failed to download/cache plugin crx: Invalid git URL: ssh://git.example.com:2222/pkg/MyRepo

Steps to Reproduce

  1. Configure a marketplace with an ssh:// git URL in ~/.claude/settings.json:
"extraKnownMarketplaces": {
  "my-tools": {
    "source": { "source": "git", "url": "ssh://git.example.com:2222/path/to/repo" }
  }
}
  1. The marketplace has a plugin with a relative source ("source": "./plugins/my-plugin")
  2. Enable and install the plugin — this succeeds
  3. Invalidate the cache (e.g., bump the plugin version in marketplace.json, or delete the cache directory)
  4. Restart Claude Code — the session-start re-caching fails with "Invalid git URL"

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.81

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Non-interactive/CI environment

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗