It took me quite a while to discover what was causing only public repos to show despite granting access to private repos on the fine-grained token.
Fine-grained tokens are new, but are encouraged as they are much better for least-privilege.
However, as per the documentation, "Support for GraphQL. Currently, fine-grained PATs can only be used against the REST APIs". This may change in the futre.
If you run the following you get an error.
gh repo list --visibility private
HTTP 401: Personal access tokens with fine grained access do not support the GraphQL API (https://api.github.com/graphql)
Therefore, the documentation should specify that the GITHUB_TOKEN must be "Classic" not "Fine-grained" if you wish to push secrets to private repos.
It took me quite a while to discover what was causing only public repos to show despite granting access to private repos on the fine-grained token.
Fine-grained tokens are new, but are encouraged as they are much better for least-privilege.
However, as per the documentation, "Support for GraphQL. Currently, fine-grained PATs can only be used against the REST APIs". This may change in the futre.
If you run the following you get an error.
Therefore, the documentation should specify that the GITHUB_TOKEN must be "Classic" not "Fine-grained" if you wish to push secrets to private repos.