C:/Users/svogel/AppData/Local/Programs/Git/plugin marketplace add fails to clone via SSH despite SSH working outside Claude Code (Windows)
Environment
- Claude Code version: 2.1.223
- OS: Windows 11 Pro 10.0.26200
- Git: 2.55.0.windows.3
- Shell tested from: PowerShell and Git Bash (both same result)
What I did
/plugin marketplace add git@gitlab.newtec.zz:newtec/nt-agent-instructions.git
What happened
Error: Marketplace file not found at C:\Users\svogel.claude\plugins\marketplaces\temp_1786015351242.claude-plugin\marketplace.json
Ran it twice (different temp folder name each time, same error both times).
What I expected
The marketplace to be added successfully — the repo has a valid .claude-plugin/marketplace.json at its root (confirmed in a local clone of the same repo).
Troubleshooting already done
ssh -T git@gitlab.newtec.zzsucceeds from Git Bash (/usr/bin/ssh, MinGW-bundled) — returnsWelcome to GitLab, @<user>!& "C:\Program Files\OpenSSH\ssh.exe" -T git@gitlab.newtec.zzalso succeeds — this is the ssh.exe that resolves first on PATH in PowerShell, i.e. what a spawned child process would most likely use- Cloning the same repo manually via
git cloneover SSH works fine - The repo's
.claude-plugin/marketplace.jsonexists and is valid in a manual clone - The temp directory (
~/.claude/plugins/marketplaces/temp_<timestamp>.claude-plugin/) is empty/removed after the failed attempt, so the clone itself appears to not populate it — this looks like the internalgit cloneinvoked by/plugin marketplace addis failing silently (no stderr surfaced to the user) rather than the marketplace.json being genuinely missing from the repo
Secondary/cosmetic bug
The error message path is missing a path separator between the username and .claude:
C:\Users\svogel.claude\plugins\marketplaces\...
should be:
C:\Users\svogel\.claude\plugins\marketplaces\...
This suggests the path is built by concatenating something like %USERPROFILE% + .claude\... without inserting a separator — likely unrelated to the clone failure itself, but worth fixing alongside it since it made initial diagnosis harder (looked like a possibly-invalid path at first).
Suspected root cause
SSH auth to the target host works from every angle testable outside Claude Code, but not from /plugin marketplace add's internal clone. Possible causes:
- The internal git clone doesn't inherit the same environment (
HOME,SSH_AUTH_SOCK,PATH) as an interactive shell - A host-key-checking or agent-forwarding prompt that fails non-interactively without surfacing an error
GIT_TERMINAL_PROMPTor similar suppressing an auth prompt that would otherwise succeed