Unable to add repos to a github app using github rest api using Fine grained token #120984
-
Select Topic AreaQuestion BodyHello Team, I am trying to write an automation to add repositories to a GitHub app to give it to teams to add repos as a self service by setting it as a workflow or as an action. i am using python language to do so. This is the endpoint: https://docs.github.com/en/rest/apps/installations?apiVersion=2022-11-28#add-a-repository-to-an-app-installation I have created the Fine grained PAT token for authentication. but the documentation is not clear as it says we cannot use fine grained PAT to add repos to a GitHub app and at same time controversial statement Fine-grained access tokens for "Add a repository to an app installation" End point: https://api.github.com/user/installations/{github_app_installation_id}/repositories/{repo_id} |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Hi @sharoon2256 @sharoon858 I am looking for how can i fix the issue as the corresponding readme is not clear. it would be really help ful if you can lend a hand here Thanks! |
Beta Was this translation helpful? Give feedback.
-
As i mentioned above, i am trying to add repos to github app installations using this end point. I am not sure what credential i can use as GitHub App user access tokens, GitHub App installation access tokens, or fine-grained personal access tokens wont work and this doesnt specify which type of cred/authentication will work as well. if possible can you share what needs to be done. Any help is really appreciated @sharoon858 Thanks! |
Beta Was this translation helpful? Give feedback.
-
I have figured out that personal access token classic is required with repo scope permissions. |
Beta Was this translation helpful? Give feedback.
I have figured out that personal access token classic is required with repo scope permissions.