Plugin marketplace add fails with private repos despite configured git credentials
Resolved 💬 3 comments Opened Jan 9, 2026 by mattconcord Closed Jan 9, 2026
Summary
claude plugin marketplace add fails to authenticate with private GitHub repositories, even when git credentials are properly configured and working with the standard git binary.
Environment
- macOS (Apple Silicon)
- GitHub CLI authenticated (
gh auth statusshows logged in) - Git credential helper configured (
gh auth setup-gitcompleted) - Standard
gitoperations work fine with private repos (git ls-remotesucceeds)
Steps to Reproduce
- Configure GitHub CLI authentication:
gh auth login - Set up git credential helper:
gh auth setup-git - Verify git works with private repos:
git ls-remote https://github.com/ORG/PRIVATE-REPO.git(succeeds) - Attempt to add private marketplace:
claude plugin marketplace add ORG/PRIVATE-REPO
Expected Behavior
Claude Code should use the configured git credential helper to authenticate with the private repository.
Actual Behavior
fatal: could not read Username for 'https://github.com': terminal prompts disabled
Analysis
It appears Claude Code uses an internal git library that:
- Does not read
~/.gitconfigcredential helper settings - Does not integrate with
gh auth git-credential - Does not access macOS Keychain credentials
Current Workaround
# Manually clone the repository
git clone https://github.com/ORG/REPO.git ~/.claude/plugins/marketplaces/ORG/REPO
# Manually edit known_marketplaces.json to register it
This workaround requires manual git pull for updates since claude plugin update hits the same credential issue.
Suggested Solutions
- Shell out to the system
gitbinary instead of using an internal library - Support
GIT_ASKPASSenvironment variable - Add a
--tokenflag for explicit authentication - Detect and use credentials from
gh auth status
Additional Note
The --accept flag appears to be referenced in documentation but does not exist in the CLI.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗