Repository navigation
Conversation
A previous fix made getRepositoryInfo()'s githubUrl point at the right host, but /plugin marketplace add can still fail on GitHub Enterprise Server deployments behind SSO with "Invalid marketplace schema from URL: Invalid input: expected object, received string". Claude Code tries a bare URL as a hosted marketplace.json source first. On github.com, an unauthenticated fetch of a repo URL 404s and it falls back to git-cloning the URL. On a GitHub Enterprise Server instance behind SSO, the same unauthenticated fetch can return HTTP 200 with the SSO login page's HTML instead of a 404, so Claude Code never falls back — it tries to parse that HTML as the marketplace.json object and fails. Appending ".git" makes the URL unambiguously a git source, skipping the JSON-fetch attempt. Verified against a real GitHub Enterprise Server deployment: the command fails without the suffix exactly as described above, and succeeds once it's added. Model: Claude Sonnet 5
|
Does this patch break existing deployments, e.g. nasa-ammos.github.com/slim? Need to verify and prove it does not. |
|
The change only affects what command the website's "Claude Code" install tab displays to a user (adding Tested both forms directly against the live
Both add the marketplace cleanly and install/use its plugins without issue. The |
Summary
getRepositoryInfo()'s fallback branch to derive the correct host URL instead of hardcoding github.com./plugin marketplace add <url>first tries the bare URL as a hostedmarketplace.jsonsource. On github.com, an unauthenticated fetch of a private/internal repo URL 404s, so Claude Code falls back togit clone-ing it. On a GHE instance behind SSO, the same fetch can returnHTTP 200with the SSO login page's HTML instead of a 404 — so Claude Code never falls back, and instead tries to parse that HTML as the marketplace.json object, failing withInvalid input: expected object, received string..gitto the URL makes it unambiguously a git source, so Claude Code skips the JSON-fetch attempt and clones directly.Found while deploying a GHE-hosted fork of this framework:
/plugin marketplace addfailed with exactly the error above until this fix was applied.Test plan
npm run buildsucceeds with no errors/plugin marketplace add <url>.gitsucceeds against the same deployment once the suffix is addednasa-ammos.github.io/slimdeployment — tested/plugin marketplace addagainstnasa-ammos/slimboth with and without the.gitsuffix; both succeed identically on github.comModel: Claude Sonnet 5