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.

remote: Permission to git denied to github-actions[bot].

See original GitHub issue

Hi, I am trying to push changes but like you will see it fails due to some errors.

Test run is here: https://github.com/NRCHKB/node-red-contrib-homekit-docker/runs/3194895671?check_suite_focus=true

Error

Run ad-m/github-push-action@master
  with:
    github_token: ***
    branch: refs/pull/42/merge
    directory: .
Push to branch refs/pull/42/merge
remote: Permission to NRCHKB/node-red-contrib-homekit-docker.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/NRCHKB/node-red-contrib-homekit-docker.git/': The requested URL returned error: 403
Error: Invalid exit code: 128
    at ChildProcess.<anonymous> (/home/runner/work/_actions/ad-m/github-push-action/master/start.js:29:21)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
  code: 128
}
Error: Invalid exit code: 128
    at ChildProcess.<anonymous> (/home/runner/work/_actions/ad-m/github-push-action/master/start.js:29:21)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)

Part of the gh action:

  dependabot:
    #needs: [build]
    runs-on: ubuntu-latest
    if: ${{ github.actor == 'dependabot[bot]' }}
    steps:
      - uses: actions/setup-node@v2
        with:
          node-version: '14'
      - uses: actions/checkout@v2
        with:
          persist-credentials: false
          fetch-depth: 0
      - run: |
          git config user.name github-actions[bot]
          git config user.email github-actions[bot]@users.noreply.github.com
          npm version patch -m "[RELEASE] %s"
      - name: Push changes
        uses: ad-m/github-push-action@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: ${{ github.ref }}
      - uses: fastify/github-action-merge-dependabot@v2.1.1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:19 (4 by maintainers)

github_iconTop GitHub Comments

58reactions
Shaquucommented, Jul 30, 2021

@ad-m here it is, says read and write image

In your reference (cbosa run), you were pushing to master, I am trying to push to PR branch.

3reactions
ad-mcommented, Jul 30, 2021

Looks mention:

GITHUB_TOKEN Permissions
  Actions: read
  Checks: read
  Contents: read
  Deployments: read
  Discussions: read
  Issues: read
  Metadata: read
  Packages: read
  PullRequests: read
  RepositoryProjects: read
  SecurityEvents: read
  Statuses: read

Default is:


GITHUB_TOKEN Permissions
  Actions: write
  Checks: write
  Contents: write
  Deployments: write
  Discussions: write
  Issues: write
  Metadata: read
  Packages: write
  PullRequests: write
  RepositoryProjects: write
  SecurityEvents: write
  Statuses: write

See https://github.com/ad-m/cbosa/runs/3197304980?check_suite_focus=true .

Something is restricting permission.

What do you have at https://github.com/NRCHKB/node-red-contrib-homekit-docker/settings/actions in “Workflow permissions” section?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Permission denied to github-actions[bot] - Stack Overflow
It is deleting the credentials of the git while checking out the repository. You can try removing the line and try.
Read more >
Permissions denied to github actions bot while building ...
For anyone still experiencing this issue, it may be due to a permission change that Github implemented some time early May (credit to...
Read more >
How to fix remote: Permission to (repo.git) denied - YouTube
When you try to use the git command to push to a remote repo and it fails with permission denied. It could be...
Read more >
[求助] github action: Permission to git denied to github-actions
Push to branch main remote: Permission to ... denied to github-actions[bot]. fatal: unable to access '...': The requested URL returned ...
Read more >
[fastpages] Initial commit - Setup fail - nbdev - Fast.ai forums
remote : Permission to fmussari/ConcreteForm.git denied to github-actions[bot]. [80](https://github.com/fmussari/ConcreteForm/runs/6196962136?
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