{
  "id": "pip/git-clone-ssh-permission-denied",
  "signature": "ERROR: Command errored out with exit status 128: git clone --filter=blob:none 'git@github.com:user/private-repo.git' /tmp/pip-req-build-xxxxx. Check the logs for full command output. Permission denied (publickey).",
  "signature_zh": "错误：命令以退出状态 128 出错：git clone --filter=blob:none 'git@github.com:user/private-repo.git' /tmp/pip-req-build-xxxxx。请查看日志以获取完整命令输出。权限被拒绝（公钥）。",
  "regex": "ERROR: Command errored out with exit status 128: git clone --filter=blob:none 'git@github\\.com:[^/]+/[^/]+\\.git' /tmp/pip-req-build-[^/]+\\..*Permission denied \\(publickey\\)\\.",
  "domain": "pip",
  "category": "auth_error",
  "subcategory": null,
  "root_cause": "pip is trying to clone a private Git repository via SSH, but the SSH key is not configured or not accepted by the remote host (e.g., GitHub).",
  "root_cause_type": "generic",
  "root_cause_zh": "pip 尝试通过 SSH 克隆私有 Git 仓库，但 SSH 密钥未配置或未被远程主机（如 GitHub）接受。",
  "versions": [
    {
      "version": "pip 22.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pip 23.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pip 23.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "git 2.30",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "git 2.40",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "HTTPS often requires username/password or token, which may not be available in the pip environment; also fails with authentication errors.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Cache clearing does not affect SSH authentication; the clone will still fail.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This is equivalent to the original; same SSH key issue persists.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Ensure SSH key is added to ssh-agent: eval $(ssh-agent -s) && ssh-add ~/.ssh/id_rsa",
      "success_rate": 0.9,
      "how": "Ensure SSH key is added to ssh-agent: eval $(ssh-agent -s) && ssh-add ~/.ssh/id_rsa",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a personal access token with HTTPS: pip install git+https://<token>@github.com/user/private-repo.git",
      "success_rate": 0.95,
      "how": "Use a personal access token with HTTPS: pip install git+https://<token>@github.com/user/private-repo.git",
      "condition": "",
      "sources": []
    },
    {
      "action": "Clone the repo manually first, then install from local: git clone git@github.com:user/private-repo.git && pip install ./private-repo",
      "success_rate": 0.9,
      "how": "Clone the repo manually first, then install from local: git clone git@github.com:user/private-repo.git && pip install ./private-repo",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Ensure SSH key is added to ssh-agent: eval $(ssh-agent -s) && ssh-add ~/.ssh/id_rsa",
    "Use a personal access token with HTTPS: pip install git+https://<token>@github.com/user/private-repo.git",
    "Clone the repo manually first, then install from local: git clone git@github.com:user/private-repo.git && pip install ./private-repo"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://pip.pypa.io/en/stable/topics/vcs-support/",
  "official_doc_section": null,
  "error_code": "ERROR",
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-03-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}