使用 GitHub API V3 从组织获取私有仓库 [英] Getting Private Repos From Organization with GitHub API V3

查看:47
本文介绍了使用 GitHub API V3 从组织获取私有仓库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在获取和组织私人存储库时遇到问题.我正在使用这种方法的 API V3:http://share.jjnford.com/HhIZ

I am having trouble obtaining and organizing private repos. I am using API V3 with this method: http://share.jjnford.com/HhIZ

我正在使用 jQuery.getJSON 命令并将我的 OAuth2 访问令牌传递给 API URL,但我只得到公共存储库的返回.

I am using the jQuery.getJSON command and passing my OAuth2 access token to the API URL but am only getting public repositories returns.

此外,如果我将私有组织存储库分叉到用户帐户(上下文)并拉取用户存储库,则除了从组织分叉的私有存储库外,所有存储库(公共和私有)都会显示出来.

Also if I fork a private organization repository to a user account (context) and pull the users repositories all the repos (public & private) show up except the private repo forked from an organization.

谁能帮我解决这个问题...这是我最后的障碍...

Can anybody help me out with this... it is my last hurdle...

提前致谢!

推荐答案

我已发现问题并已更正.根据 GitHub API V3,可以使用多个范围.似乎用户"范围不再有效.一旦我只使用了repo"范围,一切都被正确检索(私有组织存储库和私有分叉组织存储库).

I have found the problem and corrected it. According the the GitHub API V3 there are multiple scopes that can be used. It seems the the "user" scope is not valid anymore. Once I used just the "repo" scope everything was retrieved correctly (private org repos, and private forked org repos).

这篇关于使用 GitHub API V3 从组织获取私有仓库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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