[BUG] Plugins from custom marketplace fail to install with `includeIf "hasconfig:remote"`-configured credentials
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?
We use a custom plugin marketplace that’s configured to install plugins from GitHub EMU. Since I am using GitHub with multiple users, I am using the following in my .gitconfig to use different SSH keys for my different GitHub accounts:
[includeIf "hasconfig:remote.*.url:git@github.com:org-emu/**"]
path = .gitconfig-org
Where the contents of .gitconfig-org are:
[core]
sshCommand = ssh -i ~/.ssh/github-org/id_ed25519 -o IdentitiesOnly=yes
[user]
email = user@org.com
Claude Code fails to install these plugins, since it doesn’t resolve the custom SSH command configured via the above. Cloning the plugin repo manually succeeds. Installing the plugin via GIT_SSH_COMMAND='ssh -i ~/.ssh/github-company/id_ed25519 -o IdentitiesOnly=yes' claude works, but this is a pretty clunky and very non-obvious workaround.
What Should Happen?
Claude should respect the full Git config in order to determine how to clone the plugin remote and successfully install plugins from remotes that use complex Git configurations.
Error Messages/Logs
Failed to install: Failed to clone repository: Cloning into '/Users/USER/.claude/plugins/cache/temp_git_1790942786398_2975yf'...
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Steps to Reproduce
- Create a plugin marktplace and add a plugin with
"source": "url"and"url": "git@github.com/org-emu/repo.git. - Configure _secondary_ local Git credentials for
org-emuviaincludeIf "hasconfig:remote.*", as shown above. - Create the secondary credentials via
mkdir -p ~/.ssh/github-org && ssh-keygen -t ed25519 -f ~/.ssh/github-org/id_ed25519, and add the~/.ssh/github-org/id_ed25519.pubkey on GitHub for the organisation (ensure that no other SSH key is added to this account for the organisation which might be picked up by SSH by default). - Add the marketplace to Claude.
- Run
claude plugin install the-plugin@the-marketplace.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.287 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_