无法读取 GitHub 仓库

Moses Skoda工程师预计阅读 1 分钟

发生此问题时,API 返回 422 Unprocessable Content。其 type 为 https://lingo.dev/docs/api/errors/github-repository-unreadable。有关所有错误共有的结构,请参阅错误和状态码。

无法导入 <repository> 的历史记录。此连接所使用的 GitHub App 安装实例无法读取该仓库。请选择此连接中的一个仓库,或在 GitHub 上授予该应用访问此仓库的权限。

字段#

除标准的 type、status、title 和 detail 成员外,响应体还包含以下字段。detail 文本根据这些字段生成,因此客户端也可以显示自己的文本。

字段类型
repositorystring

示例#

json
{
  "detail": "Cannot import the history of <repository>. The GitHub App installation behind this connection cannot read it. Pick one of the connection's repositories, or grant the App access to it on GitHub.",
  "repository": "<repository>",
  "type": "https://lingo.dev/docs/api/errors/github-repository-unreadable",
  "status": 422,
  "title": "GitHub repository unreadable"
}

返回此错误的端点#

  • POST /v2/organizations/{orgId}/github/connections/{connectionId}/import-history