While pushing changes to my own public repo through GitHub actions, I'm getting this error.
remote: Permission to spooky/repo.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/spooky/repo/': The requested URL returned error: 403
Error: Process completed with exit code 128.
The commit code in actions was
- name: Commit Output files
run: |
git config remote.origin.url 'https://github_token@github.com/spooky/repo/'
git config --local user.email "spook@gmail.com"
git config --local user.name "spook"
git init
git add .
git commit -m "Updated"
git push origin main
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: github_token
I tried with git config remote.origin.url 'https://username:github_token@github.com/spooky/repo/' also, Getting the same error(the GitHub token has all permissions).
Can anyone help me to fix this?