[BUG] Failed to clone marketplace repository for both HTTPs and SSH
Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Workaround ✓ Mentioned in thread ↓
Activity 5 comments · opened Dec 10, 2025 · closed Aug 19, 2026
💡 Likely answer: A maintainer (bcherny, collaborator)
responded on this thread — see the highlighted reply below.
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?
Our private marketplace already installed in Claude Code, it is hosted as github repo in our organization.
Since latest version, when I try to update or add the marketplace, we encounter an issue of authentication failure for both SSH and HTTPs although by gh cli or git cli it works.
What Should Happen?
Claude should update the marketplace
Error Messages/Logs
✘ Failed to add marketplace: Failed to clone marketplace repository: SSH authentication failed. Please ensure your SSH keys are configured for GitHub, or use an HTTPS URL instead.
Original error: Cloning into '/Users/user/.claude/plugins/marketplaces/our-marketplace'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Failed to add marketplace: Failed to clone marketplace repository: HTTPS authentication failed. You may need to configure credentials, or use an SSH URL for GitHub repositories.
Original error: Cloning into '/Users/user/.claude/plugins/marketplaces/temp_1765372792604'...
fatal: could not read Username for 'https://github.com': terminal prompts disabled
Steps to Reproduce
Given a marketplace in private repo of the org
Add marketplace to the Claude Code
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.62
Claude Code Version
2.0.64
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Warp
Additional Information
_No response_
5 Comments
same here. locking myself into 2.0.62 removes the error
Ref: https://github.com/anthropics/claude-code/issues/13798#issuecomment-3672939271
Claude is sending some odd arguments to Git that will break other environments.
Workaround for Git Authentication Issues
claude plugin marketplace addfails with HTTPS authentication even when git credential helpers are correctly configured. Root cause: Claude's internal git invocation bypasses credential helpers entirely.Solution
Direct git clone + manual registration bypasses the broken
marketplace addcommand:Easy install script - succeeds where Claude Code fails
install.sh
Auto-refresh plugin - keeps marketplace up-to-date without manual git pull:
plugins/marketplace-refresh/hooks/marketplace-refresh-startup.sh
plugins/marketplace-refresh/hooks/hooks.json:
Benefits
This workaround has been tested and works reliably where claude plugin marketplace add fails.
I'm no longer seeing failures with
plugin marketplace addwith properly-configuredghCLI and https://github.com/org/my-private-marketplace.git, looks like the underlying HTTPS issue got fixed here #13553Reproduced your exact failure on 2.0.64 (Linux): with a git credential helper configured,
claude plugin marketplace add <private repo>failed withcould not read Username for 'https://github.com': terminal prompts disabled, and the helper was never invoked — even though plaingit cloneof the same URL used it fine, matching your "works with git/gh CLI" observation.This was a regression in 2.0.63/2.0.64: a change meant to stop marketplace git operations from stealing the terminal with interactive prompts also disabled git credential helpers entirely, breaking authentication to private marketplace repos over both HTTPS and SSH.
It was fixed in a recent release (changelog) — your existing auth setup (
gh auth login, keychain, git-credential-store) is used again for marketplace add/update. I verified on 2.1.233 that the credential helper is invoked and authentication works. One note: SSH clones are still non-interactive by design, so SSH keys need to be available via ssh-agent rather than a passphrase prompt.Closing as fixed — please update (
claude update) and reply to reopen if you still hit this on the latest version.🤖 Generated with Claude Code