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 status shows logged in)
  • Git credential helper configured (gh auth setup-git completed)
  • Standard git operations work fine with private repos (git ls-remote succeeds)

Steps to Reproduce

  1. Configure GitHub CLI authentication: gh auth login
  2. Set up git credential helper: gh auth setup-git
  3. Verify git works with private repos: git ls-remote https://github.com/ORG/PRIVATE-REPO.git (succeeds)
  4. 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 ~/.gitconfig credential 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 git binary instead of using an internal library
  • Support GIT_ASKPASS environment variable
  • Add a --token flag 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.

View original on GitHub ↗

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