question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Permission denied when doing action

See original GitHub issue

Hello,

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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
TimotheeMathieucommented, Mar 3, 2022
0reactions
TimotheeMathieucommented, Mar 2, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found