I'm trying to get a list of an organization's all repositories, including private ones. (Or to be more specific, all of the private repositories a certain user has access to.)
Reqesting info for the organization (https://api.github.com/orgs/acme?access_token=[...]
) shows that there indeed are plenty of private repositories:
...
"public_repos": 5,
"total_private_repos": 68,
"owned_private_repos": 68,
...
(The access token I'm using had been previously generated using the API for username/passwd.)
But whatever I try to list the repos...
https://api.github.com/orgs/acme/repos?access_token=[...]
...GitHub API just returns the 5 public repositories. (Documentation says type=all
is default. Also tried adding the parameter type=private
; no difference.)
Any idea what I'm doing wrong?
The user to whom the access token was generated in fact has Push & Pull access to just some of the organization's private repositories, but none of those appear in the list I get (just the 5 public repositories).
public_repo
scope was used. So, by creating a new token withrepo
scope I got it working. Thanks! Can you add that as an answer too, so I can accept it? – Reata&page=2
parameter – Stevestevedore&per_page=100
parameter to retrieve more results at one time. – Stevestevedore