GitHub API:使用'repo'范围,但仍不能看到私人回购 [英] GitHub API: using 'repo' scope, but still can't see private repos

查看:315
本文介绍了GitHub API:使用'repo'范围,但仍不能看到私人回购的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据GitHub API文档, 。

用户帐户是我自己的,并且我没有取消访问权限。



如何使用GitHub API V3查看私有回购站

来自测试:

>


  • 获取 / users / someusername / repos 不会显示私人回购协议(即使它是oauth您使用的访问令牌)。

  • / strong> / user / repos 显示私人回购。




这不记录在 GitHub API文档目前,我只是通过测试发现的。



感谢@ivanzuzak建议查看端点。


Per the GitHub API docs, I am requesting the repo scope which gives access to private repositories.

The user is presented with the following dialog, which also mentions private repos. They accept the application.

Despite this, when using the oauth access token obtained when asking for 'repo' access, I can only see public repos when I GET https://api.github.com/users/someusername/repos. No private repos are shown.

The user account is my own, and I have not revoked access.

How can I see private repos using the GitHub API V3?

解决方案

From testing:

  • GETing /users/someusername/repos doesn't show private repos (even if it's the user whose oauth access token you're using).

  • GETing /user/repos show private repos.

This isn't documented in the GitHub API docs at present, I just found out via testing.

Thanks to @ivanzuzak for suggesting to look at the endpoint.

这篇关于GitHub API:使用'repo'范围,但仍不能看到私人回购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆