"message": "Resource not accessible by integration" #24770
-
Hi, I’m trying to set a new GitHub Actions secret with the below Curl call using the Github API, but it is returning this message with status code 403:
This is the Curl Call in which I am trying to use:
Am I doing something wrong? I’ll be very grateful for your help. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Is the repo you are trying to set the secret in the same repo the workflow is running in? |
Beta Was this translation helpful? Give feedback.
-
No, it is a different repo. |
Beta Was this translation helpful? Give feedback.
-
You won’t be able to use the $GITHUB_TOKEN, as its permissions are scoped to just the repo that triggered the workflow. You’ll have to create a Personal Access Token (PAT) that has access to the other repos, and use that. |
Beta Was this translation helpful? Give feedback.
-
Did this finally work? |
Beta Was this translation helpful? Give feedback.
You won’t be able to use the $GITHUB_TOKEN, as its permissions are scoped to just the repo that triggered the workflow. You’ll have to create a Personal Access Token (PAT) that has access to the other repos, and use that.