Per the GitHub API docs, I am requesting the repo scope which gives access to private repositories.
The user is presented with the following dialog, which also mentions private repos. They accept the application.
Despite this, when using the oauth access token obtained when asking for 'repo' access, I can only see public repos when I GET https://api.github.com/users/someusername/repos. No private repos are shown.
The user account is my own, and I have not revoked access.
How can I see private repos using the GitHub API V3?
Your GitHub profile shows a graph of your repository contributions over the past year. You can choose to show anonymized activity from private and internal repositories in addition to the activity from public repositories.
Public repositories are accessible to everyone on the internet. Private repositories are only accessible to you, people you explicitly share access with, and, for organization repositories, certain organization members.
Your private repositories will not be deleted and they will not be made public. Of course, if you ever have any troubles, you can always email [email protected].
From testing:
GETing /users/someusername/repos doesn't show private repos (even if it's the user whose oauth access token you're using).
GETing /user/repos show private repos.
This isn't documented in the GitHub API docs at present, I just found out via testing.
Thanks to @ivanzuzak for suggesting to look at the endpoint.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With