【问题标题】:Unable to access private repositoryusing github API无法使用 github API 访问私有存储库
【发布时间】:2022-05-11 19:26:42
【问题描述】:

我无法在我的帐户下提取私有存储库的问题。

我已经创建了具有 repo 权限的个人访问令牌。

使用此命令获取问题:

curl -i https://api.github.com/repos/{owner}/{repo}/issues -H "Authorization: token {personal-access-token}" 但是出现错误:

{ “未找到信息”, “documentation_url”:“https://docs.github.com/rest/reference/issues#list-repository-issues” }

【问题讨论】:

    标签: github oauth access-token github-api private-repository


    【解决方案1】:

    也许检查组织帐户下的存储库;那么你必须使用:

    https://api.github.com/repos/{organization}/{repo}/issues
    

    完整的命令:

    curl -H "Authorization: token {personal-access-token}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/{organization}/{repo}/issues
    

    【讨论】:

      猜你喜欢
      • 2013-08-17
      • 2018-09-23
      • 1970-01-01
      • 1970-01-01
      • 2018-11-27
      • 2021-01-18
      • 2022-07-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多