[BUG] Plugin install uses SSH for public GitHub repos, fails without SSH keys configured

Resolved 💬 6 comments Opened Jan 13, 2026 by heathdutton Closed May 19, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

Plugin installation uses SSH URLs for public GitHub repos, failing for users without SSH keys configured.

| Command | Protocol | Result |
|---------|----------|--------|
| claude plugin marketplace add https://github.com/... | HTTPS | ✓ Works |
| claude plugin install plugin@marketplace | SSH | ✗ Fails |

Steps to Reproduce

  1. Use a system without GitHub SSH keys (e.g., clean Docker container)
  2. Add a public marketplace:

``
claude plugin marketplace add https://github.com/heathdutton/claude-d2-diagrams
``

  1. Install the plugin:

``
claude plugin install d2@claude-d2-diagrams
``

Error Message

Installing plugin "d2@claude-d2-diagrams"...
✘ Failed to install plugin "d2@claude-d2-diagrams": Failed to clone repository: 
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Root Cause

The github source type in marketplace.json gets converted to SSH URL (git@github.com:) for cloning, but public repos work fine with HTTPS (https://github.com/) without authentication.

Expected Behavior

Use HTTPS for public GitHub repos. SSH should only be a fallback when HTTPS fails AND SSH is configured.

Environment

  • Claude Code: 2.1.6
  • macOS and Docker (clean container, no SSH keys)

Related

  • #13553 (private repo credential issues - different problem)

View original on GitHub ↗

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