Permission denied when doing action
See original GitHub issueHello,
I am trying to use this action to automatically generate a version using dunamai some automatic version generator. I try to use add and commit action to automatically commit the new version after each PR merge but it says that I don’t have the right. The goal is for anyone that merge a PR to trigger this action.
Error :
Error: Error: Pushing to https://github.com/rlberry-py/rlberry
remote: Permission to rlberry-py/rlberry.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/rlberry-py/rlberry/': The requested URL returned error: 403
the action yml:
name: Version
on:
pull_request:
branches:
- main
types: [closed]
jobs:
versionjob:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- uses: actions/checkout@v2
with:
# This is necessary so that we have the tags.
fetch-depth: 0
- uses: mtkennerly/dunamai-action@v1
with:
env-var: MY_VERSION
- run: echo $MY_VERSION
- run: echo "__version__ = \"$MY_VERSION \"" > rlberry/_version.py
- uses: EndBug/add-and-commit@v8
with:
add: 'rlberry/_version.py'
default_author: github_actor
message: 'Writing version with github action'
Does anybody know what is wrong with my yml ? Do I have to use a token ?
Thanks
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How to fix 'permission denied' error in Linux? [Solutions]
If you are not authorized to access the file or directory, executing any command on that will result as a “permission denied” error...
Read more >GitHub ESLint action failing with "Permission Denied"
If a GitHub action fails with Permission Denied there are two possibilities: 1. You are trying to run a command that requires elevated ......
Read more >Action showing permission denied · Discussion #26239 - GitHub
Action showing permission denied #26239 I had many environmental variables so I used to gpg to encrypt those variables in a file.
Read more >Fix File Access Denied-You Need Permission to Perform This ...
Fix File Access Denied -You Need Permission to Perform This Action in Windows 10/8/7.On a Windows 10/8/7 or Vista based computer, ...
Read more >Access denied. You do not have permission to ... - TechNet
Certain steps of the workflow may require the user to have more permissions than you intend to grant them. If elevated permissions are...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Indeed I did not have the rights. Solved using https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
I checked and it says “No branch protection rules defined yet.” in the settings of the repo. So I guess that’s a no, I am not really familiar with protected branches.