[BUG] Marketplace add fails when cloning via Github Slug/ SSH. No issue with HTTPS
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?
Running /plugin marketplace add owner/repo fails when the CLI tries to clone the marketplace via SSH. Using a direct SSH URL (git@github.com:owner/repo.git) also fails. Cloning via HTTPS works and installation succeeds. The CLI attempts to clone into ~/.claude/plugins/marketplaces/... and throws “Failed to clone marketplace repository”.
What Should Happen?
Adding a marketplace should succeed with either:
• GitHub slug: owner/repo
• Direct SSH URL: git@github.com:owner/repo.git
Error Messages/Logs
Slug form:
[ERROR] Error: Error: Failed to clone marketplace repository: Cloning into ‘/Users/kamal/.claude/plugins/marketplaces/anthropics-claude-code’…
at jg1 (file:///Users/kamal/n/lib/node_modules/@anthropic-ai/claude-code/cli.js:1288:114)
at async qO0 (file:///Users/kamal/n/lib/node_modules/@anthropic-ai/claude-code/cli.js:1294:1278)
at async Wi (file:///Users/kamal/n/lib/node_modules/@anthropic-ai/claude-code/cli.js:1296:379)
at async C (file:///Users/kamal/n/lib/node_modules/@anthropic-ai/claude-code/cli.js:3121:6460)
SSH URL form:
[ERROR] Error: Error: Failed to clone marketplace repository: Cloning into ‘/Users/kamal/.claude/plugins/marketplaces/temp_1760687618398’…
at jg1 (file:///Users/kamal/n/lib/node_modules/@anthropic-ai/claude-code/cli.js:1288:114)
at async qO0 (file:///Users/kamal/n/lib/node_modules/@anthropic-ai/claude-code/cli.js:1294:1860)
at async Wi (file:///Users/kamal/n/lib/node_modules/@anthropic-ai/claude-code/cli.js:1296:379)
at async C (file:///Users/kamal/n/lib/node_modules/@anthropic-ai/claude-code/cli.js:3121:6460)
HTTPS:
No error. Cloning marketplace goes through.
Steps to Reproduce
Add a marketplace with Github repo slug:/plugin marketplace add anthropics/claude-code
Add a marketplace with SSH URL:/plugin marketplace add git@github.com:anthropics/claude-code.git
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.21
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
No issue with HTTPs cloning.
31 Comments
I am also facing this on macos with claude-code-v2.0.21;
same issue here. To go around the issue (add the marketplace manually)
Enjoy!
Same
@Rigos0 Thanks, it did work but after I tried several times -- where I got different errors, sometimes it was EOF, other time it was clone was successful but checkout failed. Eventually it worked for skills.git.
I am now trying to add anthropics/claude-code.git (using ssh, or https url), I keep getting same error:
│ https://github.com/anthropics/claude-code.git │
│ │
│ Failed to clone marketplace repository: Cloning into '/Users/xxx/.claude/plugins/marketplaces/temp_1761388841944'...
It doesn't work for this plugin.
It seems like the issue is when you use SSH agent or similar - we use git with ssh agent that runs via 1Password - so the SSH agent is added with the use of the Windows SSH mapping in the git config
[core]
sshCommand = /mnt/c/Windows/System32/OpenSSH/ssh.exe
It works perfect all other areas - but claude code does not respect it it says no access, but if i add a ssh-keygen into my ssh folder it works perfect with the key that is generated in .ssh folder
So - it seems like it have a embeded git version and does not actually use the systems git implementation but uses a embeded git that does not support or acknowldge this?
Can you @zhiyanliu and @Rigos0 or @abdul confirm this? If you are using normal ssh keygen or?
My SSH config does not have the condition you mentioned. Thanks for your additional inputs. @dkmaker
If i run a term in VSCode via WSL - and i have IDE integration on Claude Code VSCode prompts for the username and then it works - its ONLY in terminal or ssh it breaks
If i have a SSH key generated and stored and added to my github account then it works if its plain no password
So it seems like there is a combination that have to be satisfied - would love to know what git/ssh combination they use if its the OS or if its embeded - my theory is they (Claude code) use a embeded Git/SSH library of some sort?
Also no matter what claude code crashes when it promtps for the username so im fully stuck when i want to authenticate only works when run from VSCode attached to my WSL Session
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
another solution:
1、download your my-plugins.git folder to <your addr>/.claude/plugins/marketplaces/my-plugins
2、add in your settings.json
<img width="2306" height="1134" alt="Image" src="https://github.com/user-attachments/assets/f3b12ebd-adb6-4b2a-a73e-e15be19069c2" />
This problem reappeared today when I was automatically upgraded to version 2.0.64. It returned to normal when I reverted to version 2.0.62.
<img width="892" height="481" alt="Image" src="https://github.com/user-attachments/assets/ec8028af-6d6c-47fb-894a-ad7a1ad1f68e" />
<img width="895" height="600" alt="Image" src="https://github.com/user-attachments/assets/720bad65-f7f2-408a-80c3-f082e54a092e" />
I can confirm this happens to me also.
I'm currently fixing the version to 2.0.62 by changing the environment variable DISABLE_AUTOUPDATER = 1. Hopefully, this will completely resolve the issue later.
Can we get an update on this one please @dhollman? I keep having to downgrade back to 2.0.62
Thank you
This issue is that after version 2.0.62, only public plugin repositories can be used and private repositories are not allowed.
But I remember when I installed the private plugin repository before, a password box popped up and I didn't know where it was stored after entering it. I guess the problem with HTTPS is that the verification failed because the user and password data could not be obtained...
Same problem with private repos
No updates? It blocks me using any new version when i want to use a private set of custom plugins (private repo)
Hit this too on macOS (Darwin 25.1.0) with Claude Code 2.0.71.
Interestingly, the error shows up just by running
/plugin- looks like it tries to load the defaultclaude-skillsmarketplace automatically and fails there.I've been told by Anthropic support that this issue may be fixed by the end of the week. At least they're working on it. 🤞
I'm looking forward to it
Cloning via https fails for me as well (tried both with
.gitat the end and without). Workaround:Had the same issue — spent some time debugging it.
TL;DR: It's using SSH instead of HTTPS for public repos.
Quick diagnosis:
# Check what protocol your official marketplace uses:
git -C ~/.claude/plugins/marketplaces/claude-plugins-official remote -v
# You'll see HTTPS (works):
# origin https://github.com/anthropics/claude-plugins-official.git
Workaround that works:
# Manual HTTPS clone
git clone https://github.com/owner/repo.git ~/.claude/plugins/marketplaces/owner-repo
The fix (if anyone's looking at the code):
git@github.com:${owner}/${repo}.git;https://github.com/${owner}/${repo}.git;Hope this helps someone!
Nice! Glad the diagnosis helped. Thanks @ai-cora for the quick fix 🏎️
nice end to 2025! ✨
Crazy this hadn't been fixed for weeks now.
any progress?
Downgrading to 2.0.62 functions as workaround, so something has been broken since then.
Temporary Solution
If you encounter an issue with cloning the Marketplace via SSH or HTTPS, you can try entering the Marketplace address using the proxy address mode. For private repositories, it is recommended to use a Git token as the password.
For example:
Please replace
git_tokenwith your actual Git token.This method applies to private repository addresses and can be used as a temporary solution.
Please fix this issue. I’m encountering the same problem when adding a marketplace:
claude plugin marketplace add https://gitlab.mycompany.com/lb-public/claude-plugins.git
It fails with:
fatal: could not read Username for ‘https://gitlab.mycompany.com’: terminal prompts disabled
Environment: macOS, Claude 2.1.1.
The SSH URL also fails. It appears that Claude’s built-in Git/SSH does not support interactive authentication.
[BUG] Marketplace add fails when cloning via Github Slug/ SSH. No issue with HTTPS
Problem Overview:
When cloning a GitHub repository as a plugin marketplace using SSH or HTTPS, the command-line tool fails to clone successfully. Cloning via HTTPS does not have this issue.
Solution:
The following format can be used to correctly add the Marketplace:
If you find it inconvenient to expose the password, you can switch to using a Git token:
Git tokens can be obtained from GitLab for personal tokens.
Scope of Impact:
This issue affects macOS users with Claude Code 2.0.21 or higher.
Temporary Solution:
If you encounter cloning issues, you can try using the proxy address mode and using the Git token as the password. For example:
Please replace
git_tokenwith your actual Git token.Note:
This method applies to private repository addresses and can be used as a temporary solution. wish fixing this issue as soon as possible so that users can use the SSH and HTTPS clone plugins in the marketplace normally.
Getting the same issue, v2.1.6, macos, using private corp github instance:
My git is setup with GCM/OSXK and claude code can access the repo just fine using bash+git.
Still having to downgrade to 2.0.62 to configure a private GitHub marketplace
Just hit this limitation; here's a workaround
i.e. list
httpsfor your plugin url, but when installing (by way ofgit), it'll seamlessly convert JITI'd still love to see this get addressed, but wanted to share what is a reasonable workaround (as I don't mind this config in general as why would I ever want
httpsoverssh)I know this is closed but leaving this here for future people using github instead of gitlb
git config --global --show-origin --get-regexp '^url\.' || true
git config --global url."https://github.com/".insteadOf "git@github.com:"
Verify Git now rewrites the exact failing clone target to HTTPS.
GIT_TRACE=1 git ls-remote git@github.com:danielrosehill/Claude-Sysadmin-Homelab-Plugin.git HEAD