How to get list of PRIVATE repositories via api call

How to get list of PRIVATE repositories via api call

Using this command, it only retrieves the list of PUBLIC repositories…
curl -H “Authorization: token MYTOKEN”

My token has all the checkmarks select to enable all permissions, and I still cannot retrieve the list of private repos.

I also tried this and it didn’t work…
curl -H “Authorization: token MYTOKEN”
-d “{“visibility”:“private”}”

I’m not sure this is the API you are looking for.
Try this one:

Without credentials, you will receive all public repositories of the user.
With credentials you will also receive the private ones.

Thanks, that worked. It retrieves both public and private repos…

curl -H “Authorization: token MYTOKEN”

I’m looking for an API which returns repos for an owner (a user or an org). In the docs, the search api has
user:USERNAME and org:ORGNAME ( see )

In my tests, both return the same results (ie they work for user:ORGNAME and org:USERNAME in addtion to user:USERNAME and org:ORGNAME)

Is this intended ? Is it going to continue to work ?What’s the difference between the two ?

Maybe the keyword “owner” should be used when referring to something that can be a user or an org.

Also’ works’ fails:

  "message": "Only the first 1000 search results are available",
  "documentation_url": ""

Could you improve (and maybe merge?) or to return all the results ?