Visibility of internal repositories using fine-grained access token #126773
Unanswered
pajones76
asked this question in
API and Webhooks
Replies: 1 comment
-
For anyone coming across this issue - When creating a fine-grained token, it's necessary to set the Resource owner dropdown appropriately. Namely, select the organization or owner of the repositories that you want to access. Then under that select All repositories and set the permissions to be as narrow as possible for whatever you are trying to accomplish. This allows access to both public and internally visible repositories. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
General
Body
I've been using my fine-grained access token recently to scan through all the repos in my organization's Github Enterprise instance with this API endpoint:
/repos/{owner}/{repo}/contents/{path}
This has been working great, except that it does not see repos with an internal visibility. When I went to the settings for my token, and tried to switch to "All repositories" from "Public repositories", I got a long list of potential permissions to update.
I'm not sure what in that list, if anything, I can modify that would allow API calls to see internal repos, and I'm having trouble finding this anywhere in the documentation or here on the forum. Maybe those settings aren't even the correct place to look, but it's where I'm starting. Any insight appreciated, thank you.
Beta Was this translation helpful? Give feedback.
All reactions