元数据
| id | claude-mem-1 | 收录 | 2026-08-29 |
|---|---|---|---|
| 问题域 | 会话与记忆 | 主题分组 | 网络与镜像 |
| 适用工具 | claude-mem | ||
症状
`claude-mem install --ide claude-code` 在 "Adding marketplace…" 处报错或长期卡住:
```
✘ 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.
```
或直连时克隆无进展后报 `Recv failure: Connection reset by peer`。
原因
Claude Code 插件安装 = git clone 上游仓库 thedotmack/claude-mem(浅克隆 + 递归子模块;实测仓库约 271MB),安装器默认走 SSH URL(`git@github.com:...`)。无可用 SSH key(或 key 对应账号状态异常)时认证失败;国内直连 GitHub 时大仓库克隆容易中断。
解法
1. 强制 HTTPS(公开仓库匿名即可克隆,不需要 key):
`git config --global url."https://github.com/".insteadOf "git@github.com:"`
2. 国内加速(2026-08-28 实测可用):
`git config --global url."https://gh-proxy.com/https://github.com/".insteadOf "https://github.com/"`
3. CLI 本身走镜像源:`npm_config_registry=https://registry.npmmirror.com npm install -g claude-mem`
4. 以上只改 git clone 的 URL 通道,不改插件任何行为;不用给任何账号授权。
验证证据
- 本市场实测 2026-08-28(实测记录(本地留存)):
- 无改写时:SSH 认证失败(key 对应账号状态异常)→ install FAIL;
- 加改写后:`SSH not configured, cloning via HTTPS` → `✔ Successfully added marketplace: thedotmack` → `✔ Successfully installed plugin: claude-mem@thedotmack (scope: user)` → `claude-mem installed successfully!` → install exit=0;
- 直连 90s 未完成 vs gh-proxy 加速后 60s 内克隆完成(单次实测;仓库实测 271MB)。
来源与证据
素材来源:本站实测沉淀(2026-08-28)
验证证据:site docs#1;local repro log