authentication - GitHub API : using 'repo' scope, 但仍然看不到私有(private)仓库

标签 authentication github github-api

根据 GitHub API 文档,I am requesting the repo scope which gives access to private repositories .

用户会看到以下对话框,其中还提到了私有(private)仓库。他们接受申请。

enter image description here

尽管如此,当使用请求“repo”访问时获得的 oauth 访问 token 时,我只能在 GET 时看到公共(public) repos https://api.github.com/users/someusername/repos .没有显示私有(private) repo 。

用户帐户是我自己的,我没有撤销访问权限。

如何使用 GitHub API V3 查看私有(private)存储库?

最佳答案

从测试:

  • 获取 /users/someusername/repos 不显示私有(private) repo (即使它是您正在使用的 oauth 访问 token 的用户)。
  • 获取 /user/repos 显示私有(private) repo 。

  • 这在 GitHub API docs 中没有记录。目前,我只是通过测试发现的。

    感谢@ivanzuzak 建议查看端点。

    关于authentication - GitHub API : using 'repo' scope, 但仍然看不到私有(private)仓库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21907278/

    相关文章:

    c# - 错误 (407) "Proxy Authentication Required."

    github - 如何在 GitHub Windows 客户端中同步未同步的提交?

    api - 如何通过 GitHub API 获取项目徽章?

    ios - iOS 应用程序内的新 field ?

    Symfony2 登录路由不断重定向到 https

    wcf - 对于 WPF 和 WCF 应用程序的用户身份验证/授权,什么被认为是 "best practice"?

    ios - 创建一个新的Cocoapod : use example project for remote repo?

    java - 在java中执行git blame命令

    git - 使用 Octokit.net 进行身份验证并使用 LibGit2Sharp 推送到 GitHub 存储库

    github-api - 通过 github-api 获取所有 GitHub 用户