peaceiris / actions-gh-pages

GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly.
https://github.com/marketplace/actions/github-pages-action
MIT License
4.53k stars 361 forks source link

support: Error: Action failed with "The process '/usr/bin/git' failed with exit code 128" #1069

Closed IamShubhamGupto closed 3 months ago

IamShubhamGupto commented 4 months ago

Checklist

Describe your question

How do I fix the deployment permission issue?

Relevant links

Public repository: https://github.com/m2lines/data-gallery
YAML config: https://github.com/m2lines/data-gallery/blob/main/.github/workflows/trigger-preview.yml
YAML workflow: https://github.com/m2lines/data-gallery/actions/runs/7964546277

Relevant log output

Run peaceiris/actions-gh-pages@v3.9.3
[INFO] Usage https://github.com/peaceiris/actions-gh-pages#readme
Dump inputs
Setup auth token
Prepare publishing assets
Setup Git config
Create a commit
Push the commit or tag
  /usr/bin/git push origin gh-pages
  remote: Permission to m2lines/data-gallery.git denied to github-actions[bot].
  fatal: unable to access 'https://github.com/m2lines/data-gallery.git/': The requested URL returned error: 403
  Error: Action failed with "The process '/usr/bin/git' failed with exit code 128"

Additional context.

I am aware of previous resolved threads in the issues section and also followed the commands from the readme section. however, it does not seem to work.

I have tried setting up permissions through code and the GitHub interface, both give same result

IamShubhamGupto commented 4 months ago

@peaceiris hello!

whenever you get a chance, could you review our repository and help us figure why our previews do not get deployed? thank you

pnavaro commented 3 months ago

Settings -> Actions -> General -> Workflow permissions -> Read and write permissions -> Save

IamShubhamGupto commented 3 months ago

Hey @pnavaro we have already enabled read and write permissions...was hoping to see if we missed anything else

pnavaro commented 3 months ago

Hi, sorry I found your issue because I had the same error. This settings change worked for me. I use this action with jupyter-book and it works well. Perharps you can try to change the action version to v3 or v3.6.1 ...

IamShubhamGupto commented 3 months ago

Turns out my setup of using GitHub actions was wrong. I rewrote the action and the same code runs now?? thanks for your help