claude-code - 💡(How to fix) Fix Plugin install uses SSH clone even when HTTPS URL is specified [2 comments, 3 participants]

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…
GitHub stats
anthropics/claude-code#50725Fetched 2026-04-20 12:14:47
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×2

When installing a plugin via /plugin install, the system clones via SSH even when the marketplace source uses "source": "url" with an HTTPS URL. On machines without GitHub's host key in ~/.ssh/known_hosts, this fails with:

Host key verification failed.
fatal: Could not read from remote repository.

Error Message

  1. /plugin install plugin-name@marketplace-name — fails with SSH error Plugins cannot fix this because the error occurs during installation, before any hooks are registered.

Root Cause

Plugins cannot fix this because the error occurs during installation, before any hooks are registered.

Fix Action

Fix / Workaround

Current Workaround

Code Example

Host key verification failed.
fatal: Could not read from remote repository.

---

mkdir -p ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts 2>/dev/null
RAW_BUFFERClick to expand / collapse

Summary

When installing a plugin via /plugin install, the system clones via SSH even when the marketplace source uses "source": "url" with an HTTPS URL. On machines without GitHub's host key in ~/.ssh/known_hosts, this fails with:

Host key verification failed.
fatal: Could not read from remote repository.

Steps to Reproduce

  1. Fresh Windows machine (no ~/.ssh/known_hosts or missing GitHub entry)
  2. /plugin marketplace add https://github.com/owner/repo.git — succeeds
  3. /plugin install plugin-name@marketplace-name — fails with SSH error

Expected Behavior

The plugin system should either:

  • Use HTTPS for cloning when the source specifies an HTTPS URL
  • Auto-run ssh-keyscan github.com before SSH clone
  • Fall back to HTTPS when SSH clone fails

Current Workaround

Users must manually run before first install:

mkdir -p ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts 2>/dev/null

Plugins cannot fix this because the error occurs during installation, before any hooks are registered.

Environment

  • Windows 11 Pro
  • Claude Code CLI

extent analysis

TL;DR

The system should use HTTPS for cloning when the source specifies an HTTPS URL, and a workaround is to manually add GitHub's host key to ~/.ssh/known_hosts before installing plugins.

Guidance

  • Verify that the marketplace source URL starts with "https" to ensure it's not an SSH URL.
  • Run the provided command mkdir -p ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts 2>/dev/null before installing plugins as a temporary workaround.
  • Consider modifying the plugin installation process to automatically use HTTPS cloning when the source URL is an HTTPS URL.
  • Check if the Claude Code CLI has any configuration options to specify the cloning protocol (HTTPS or SSH) for plugin installation.

Example

No code snippet is provided as the issue does not require a code change, but rather a configuration or process change.

Notes

This solution assumes that the Claude Code CLI does not have a built-in mechanism to handle host key verification for SSH cloning. The workaround provided may not be suitable for all environments, especially those with strict security policies.

Recommendation

Apply workaround: Manually add GitHub's host key to ~/.ssh/known_hosts before installing plugins, as this is a simple and effective solution to the problem, although it may not be the most elegant or long-term fix.

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

claude-code - 💡(How to fix) Fix Plugin install uses SSH clone even when HTTPS URL is specified [2 comments, 3 participants]