Closed kjy5 closed 5 months ago
Turns out you need to set the PAT's resource owner to the organization... This didn't seem to be a thing before but this solved it for me.
Thanks for sharing the solution here @kjy5.
Turns out you need to set the PAT's resource owner to the organization... This didn't seem to be a thing before but this solved it for me.
@kjy5 I'm having the same issue as the OP. I assume PAT stands for personal access token, but can you please go into a bit more detail on how to accomplish this?
@Zamiell Yes, PAT stands for personal access token. When you create a new fine-grained personal access token you can define the resource owner.
In my case I can select my personal account or one of the organisations I'm part of. (Funny though, that I currently can only select an organisation I only rarely participate in, but not my primary work org)
Thanks @stefanzweifel . However, I'm a bit confused. Why do I have to create a fine-grained personal access token? Why can't I use the automatic one that is created for use in GitHub actions (and is recommended in this repository's README.md file)?
@Zamiell You definitely don't need to create and use a fine-grained personal access token to use this Action, if your requirements are relatively simple. (I pesonally never had the need to use PAT in any of my personal or work projects)
A PAT is required, if you want that a commit made by this Action should trigger other workflows or when you've set up branch protection in your repository.
That these scenarios don't work with the default GITHUB_TOKEN
is due to how GitHub designed GitHub Actions and the security model around it. That's not something I can change.
As mentioned, fine-grained tokens are not required. I've just been using them because they're the new method. They honestly work the same.
git-auto-commit Version
v5.0.0
Machine Type
Ubuntu (eg. ubuntu-latest)
Bug description
The action was denied remote permissions (to push) and failed.
Steps to reproduce
See this workflow run.
Tried solutions
Example Workflow
Relevant log output