claude-code - 💡(How to fix) Fix [BUG] SSH marketplace add error message hardcodes "GitHub" regardless of host

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

When /plugin marketplace add <ssh-url> fails SSH authentication against a non-GitHub host, Claude Code emits an error message that references "GitHub" even though the target host is something else.

Error: Failed to clone marketplace repository: SSH authentication failed. Please ensure your SSH keys are configured for GitHub, or use an HTTPS URL instead. Note: a separate SSH error branch — the "host key not in known_hosts" path — is already host-aware (correctly names the target host in its hint). Only the authentication-failure branch still hardcodes "GitHub". The error message should reference the actual hostname parsed from the URL, e.g.:

Error Messages/Logs

  1. Observe the error message.

Code Example



---

ssh -T -o StrictHostKeyChecking=accept-new git@gitlab.com

---

/plugin marketplace add git@gitlab.com:gitlab-org/gitlab.git
RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

When /plugin marketplace add <ssh-url> fails SSH authentication against a non-GitHub host, Claude Code emits an error message that references "GitHub" even though the target host is something else.

Verified reproduction (Claude Code, 2026-05-26):

/plugin marketplace add [email protected]:gitlab-org/gitlab.git

(after seeding gitlab.com into known_hosts via ssh -T -o StrictHostKeyChecking=accept-new [email protected], with no SSH key configured for GitLab)

Surfaces:

Error: Failed to clone marketplace repository: SSH authentication failed. Please ensure your SSH keys are configured for GitHub, or use an HTTPS URL instead.

Note: a separate SSH error branch — the "host key not in known_hosts" path — is already host-aware (correctly names the target host in its hint). Only the authentication-failure branch still hardcodes "GitHub".

What Should Happen?

The error message should reference the actual hostname parsed from the URL, e.g.:

SSH authentication failed. Please ensure your SSH keys are configured for gitlab.com, or use an HTTPS URL instead.

Or use host-agnostic phrasing matching the recently-improved host-key branch.

Error Messages/Logs

Steps to Reproduce

  1. Make sure no SSH key is configured for gitlab.com in your SSH agent or ~/.ssh/config. (Any non-GitHub host you don't have an SSH key for works; GitLab is just convenient.)

  2. Seed the host key into known_hosts so the SSH layer gets past the host-key check and into authentication:

    ssh -T -o StrictHostKeyChecking=accept-new [email protected]

    Expected: Permission denied (publickey). — that's fine, we just need the host key cached.

  3. Inside claude, run:

    /plugin marketplace add [email protected]:gitlab-org/gitlab.git
  4. Observe the error message.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.150

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING