-
Notifications
You must be signed in to change notification settings - Fork 236
Permission error on push action #188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If I change the Push commits step to not use your action and run a git command instead, I don't get a permission error and instead I get this: Error
When searches this error, it looks like it is unable to find the branch, but the branch is 100% present. Different step
|
Hi @vetlekise, could you please share your findings? What went wrong on your end? From my end, it looks like your GH repository action settings are not configured properly. |
I got it working by using a PAT (fine-grained) targeting the organization repo with the permissions; PullRequest:Read&Write and Contents:Read&Write, instead of the GITHUB_TOKEN. New workflow that worked for me:
|
@vetlekise Thank you for sharing your solution, but in general, it should also work with the GH Action, and if you are pushing to the same repository as the origin content comes from also with the default token. I think you've maybe missed to set-up the GitHub Action push settings beforehand. |
Trying to accomplish
Disclaimer (if it matters): Repo is in an organization repo.
I am creating a workflow that runs on a PR in a specified directory and the workflow will lint my code by running
terraform fmt -write=true
. This lint should be committed and then pushed to the pull request branch. Is this not possible or am I doing it wrong?The error is showing the correct branch and URL, and I am using GITHUB_TOKEN for the permissions. Does this token not work for this use case or is the permissions not correct?
Workflow error
Workflow used
The text was updated successfully, but these errors were encountered: