GitHub api请求的身份验证问题
我试图从GitHub上的存储库中检索协作者列表,例如,我正在使用Golang的GitHub API存储库 在curl中,请求如下所示:GitHub api请求的身份验证问题,git,curl,github,github-api,Git,Curl,Github,Github Api,我试图从GitHub上的存储库中检索协作者列表,例如,我正在使用Golang的GitHub API存储库 在curl中,请求如下所示: curl -u "my user" https://api.github.com/repos/google/go-github/collaborators 在密码提示后,我得到以下JSON结果: { "message": "Must have push access to view repository collaborators.", "docume
curl -u "my user" https://api.github.com/repos/google/go-github/collaborators
在密码提示后,我得到以下JSON结果:
{
"message": "Must have push access to view repository collaborators.",
"documentation_url": "https://developer.github.com/v3"
}
如何获得推送访问?我自己需要成为合作者吗?仅仅为了得到一个项目贡献者的列表就有点太多了
如何获得推送访问?我自己需要成为合作者吗?仅仅为了得到一个项目贡献者的列表,就有点太多了
项目的合作者和贡献者是不同的
贡献者是任何接受了提交的人,即项目网页上的公共信息和运行git log
合作者是Github上的项目管理员,这些信息是私有的。看起来像是这样。我不认为你能做很多事情来回避这个问题。奇怪。你想得到一个项目的合作者还是他们的贡献者?他们是不同的。贡献者是任何接受了提交的人,这是Git存储库本身中的公共信息。合作者是项目管理员,这些信息是私有的。@Schwern我需要贡献者。编辑-刚刚测试过。作品给我一个答案,这样我就可以给你打勾了!
$ curl -s https://api.github.com/repos/google/go-github/contributors | head -20
[
{
"login": "willnorris",
"id": 1112,
"avatar_url": "https://avatars.githubusercontent.com/u/1112?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/willnorris",