Reputation: 1759
I am trying to retrieve a list of collaborators from a repository on GitHub, as an example, I am using the repository of the GitHub API for Golang.
In curl, the request would be the following:
curl -u "my user" https://api.github.com/repos/google/go-github/collaborators
After a password prompt, I get the following JSON result:
{
"message": "Must have push access to view repository collaborators.",
"documentation_url": "https://developer.github.com/v3"
}
How do I get push access? Do I need to become a collaborator myself? A bit too much just to get a list of a project's contributors.
Upvotes: 1
Views: 1048
Reputation: 164809
How do I get push access? Do I need to become a collaborator myself? A bit too much just to get a list of a project's contributors.
A project's collaborators and contributors are different.
Contributors are anyone who's had a commit accepted, that is public information on the project web page and from running git log
. You can get project contributors from the Github API without logging in.
$ 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",
Collaborators are the project administrators on Github, that information is private.
Upvotes: 4