简体   繁体   中英

Permission denied to github-actions[bot]

I'm using mkdocs to generate documents for my project,now I can't deploy those docs to Github pages,it tell me:

remote: Permission to XXX.git denied to github-actions[bot]. fatal: unable to access 'XXX': The requested URL returned error: 403

This is my CI config .

And my secrets of the repository:(The two GIT_ACTIONS_PUSH are all my personal access tokens.)

And if I start the CI process manually, CI will crash like this .

How can I solve it?

I think the persist-credentials: false and fetch-depth is the issue. It is deleting the credentials of the git while checking out the repository.

You can try removing the line and try.

    - uses: actions/checkout@v3

You need to update the Actions permissions on the repo as shared here

Try to check this setting->action->general->Workflow permissions.

Workflow permissions Setting

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM