List all repos(internal included) from a Github org using API #24769
-
I am trying to list all the repos(public, internal) within the org that I am the owner of using the below command.
There are about 2 public repos and 10+ internal repos but the above command is listing out only the 2 public repos. I went through the documentation and tried all the options as suggested here with
How do I get to list out the internal repositories? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
Are you using GHEC or GHES? |
Beta Was this translation helpful? Give feedback.
-
We use GHEC. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I can’t recreate this. When I run the same command against my GHEC, it is returning all the repos. Interesting, it shows internal as private, but otherwise it is returning all the repos. Check your PAT. Does it have the appropriate rights? Can you create a token with all rights, just to make sure? Are you using SSO? Did you click the enable sso on your PAT? |
Beta Was this translation helpful? Give feedback.
-
Thanks for looking into this. Just for confirmation, you had run the same command that I had listed above and its listing out all the internal repos as well? Yes, as for the PAT, I went ahead and created one with all the permissions but am still not able to see the internal repos. One of the other team members with similar admin permissions is seeing the same issue as well. We use SSO and enabled it for the PAT too. Thanks! |
Beta Was this translation helpful? Give feedback.
-
oh wait. My curl command is slightly differnet :slight_smile: If I use “basic”, I don’t get back my internal ones. However, if I use Token, I do: curl -H ‘Authorization: token your-token-here’ ‘https://api.github.com/orgs/your org here/repos’ |
Beta Was this translation helpful? Give feedback.
-
In your header, replace “Basic” with “token” and see what happens. |
Beta Was this translation helpful? Give feedback.
-
Awesome, that worked, thanks! would be great if the documentation covers this as well :slight_smile: thanks for your time again! |
Beta Was this translation helpful? Give feedback.
In your header, replace “Basic” with “token” and see what happens.