create-release icon indicating copy to clipboard operation
create-release copied to clipboard

"Resource not accessible by integration"

Open gyorokpeter opened this issue 5 years ago • 6 comments

I have tried to add this action to my build but I get this error. What exactly does it mean and how to fix it?

The config can be seen here: https://github.com/finos/kdb-studio/pull/15/files

gyorokpeter avatar Oct 19 '20 12:10 gyorokpeter

have you tried swopping out secrets.GITHUB_TOKEN with your PAT? worked for me 😸

duckduckdroid avatar Nov 04 '20 21:11 duckduckdroid

@howzitcal What does PAT stand for?

gyorokpeter avatar Nov 05 '20 08:11 gyorokpeter

@gyorokpeter my bad, a personal access token = https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token

duckduckdroid avatar Nov 05 '20 18:11 duckduckdroid

"Warning: Treat your tokens like passwords and keep them secret. When working with the API, use tokens as environment variables instead of hardcoding them into your programs." But how do I avoid this hardcoding in github actions? Putting them into main.yml would reveal it to the world.

gyorokpeter avatar Nov 06 '20 07:11 gyorokpeter

store it as a secret in your repo give the secret a name like PAT then in the github action call it by typing ${{secrets.PAT}}

duckduckdroid avatar Nov 06 '20 08:11 duckduckdroid

In the meantime I have also been looking elsewhere for similar problems. Turns out it was only because I was trying to use the action from a PR which doesn't have write permissions, but it is not obvious from the error message. So adding a condition " if: github.event_name == 'push'" solved it.

gyorokpeter avatar Nov 07 '20 07:11 gyorokpeter