What scopes are needed for a GITHUB_TOKEN to write secrets to a repository? #3164
-
Hi, I'm trying to get a github runner to update a secret in a github workflow, but I can't figure out what scopes it needs to do so. I've tried searching online, and the API docs and general results all make reference to using PATs, which I want to avoid as tying runner credentials to my personal user seems like a bad practice. I think this page would greatly benefit from a list of API endpoint groups that are accessible for each scope (or the API docs could be updated to include required GITHUB_TOKEN scopes). This isn't the first time the difference in scopes between PATs and GITHUB_TOKEN have caused issues and I feel that scopes such as "checks" and "contents" don't help much in the way of determining what I'm granting access to. Any help would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Bumping as this is still an issue |
Beta Was this translation helpful? Give feedback.
-
Under "Permissions for the The secrets API requires the |
Beta Was this translation helpful? Give feedback.
-
Fixed by using a GitHub App and obtaining a token. For those wondering, the steps are as follows:
|
Beta Was this translation helpful? Give feedback.
Fixed by using a GitHub App and obtaining a token. For those wondering, the steps are as follows: