shalzz / zola-deploy-action

Github action for building a Zola site and deploying to Github Pages
MIT License
211 stars 91 forks source link

fatal: Authentication failed #77

Open amrirasyidi opened 1 year ago

amrirasyidi commented 1 year ago

I got this error while trying to publish my github pages. fatal: Authentication failed for 'https://github.com/amrirasyidi/pmed.git/'

I followed the instruction from here and use the script in this repo as the yaml file as such:

name: Zola on GitHub Pages

on: 
 push:
  branches:
   - master

jobs:
  build:
    name: Publish site
    runs-on: ubuntu-latest
    steps:
    - name: Checkout master
      uses: actions/checkout@v3.0.0
    - name: Build and deploy
      uses: shalzz/zola-deploy-action@v0.17.2
      env:
        GITHUB_TOKEN:

I provided the GITHUB_TOKEN ofc.

What can I do to fix this error?

danwlsn commented 1 year ago

I found success after changing the workflow permission to read and write.

This can be found in Settings -> Actions -> General -> Workflow permissions in the repository you're trying to deploy.

Screenshot 2023-07-25 at 14 13 19

Let me know if this helps

gruvw commented 2 months ago

Sorry to bump, I got the same problem today.

The solution worked for me but I think it should be detailed in the official documentation (maybe troubleshooting section?).

If you get a permissions denied error, you may need to change the workflow permissions to read and write in Settings > Actions > Workflow permissions.

From the docs so it is there, but maybe the screenshot could help too.