在通过 GitHub Actions 推送更改到我自己的公共仓库时,我遇到了这个错误。
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.
Actions 中的提交代码为:
- 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
我尝试过使用 git config remote.origin.url 'https://username:github_token@github.com/spooky/repo/'
,但是仍然遇到了相同的错误(GitHub token 具有所有权限)。
有人能帮我解决这个问题吗?