1

I am trying to the list the private repos of the organization using GitHub API, but I am getting only the public repository as return.

Here's the URL : https://api.github.com/orgs/github/repos

Also I added the access token in the header, and also given the right scopes.

Here's the documentation: https://developer.github.com/v3/

https://developer.github.com/v3/orgs/#list-organizations-for-the-authenticated-user

1 Answer 1

1

You can Use the Github API: https://developer.github.com/v3/repos/#list-organization-repositories

GET /orgs/:org/repos

To access repository visibility during the preview period, you must provide a custom media type in the Accept header:

application/vnd.github.nebula-preview+json

enter image description here

You can also add the type parameter to control the visibility:

enter image description here

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks for your response bro. tried adding Accept this 'application/vnd.github.nebula-preview+json' along with the query string parameter ' type = all'. Not returning the private repo
You can take a look at github.com/vivekgoel15/GithubAPIUtility/blob/master/src/main/… Although it's in java, but might help you to pass token and data to github server
Thanks for your response bro. I'm just done a mistake in url path. now its working fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.