zola-deploy-action icon indicating copy to clipboard operation
zola-deploy-action copied to clipboard

fatal: Authentication failed

Open amrirasyidi opened this issue 1 year ago • 3 comments

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/[email protected]
    - name: Build and deploy
      uses: shalzz/[email protected]
      env:
        GITHUB_TOKEN:

I provided the GITHUB_TOKEN ofc.

What can I do to fix this error?

amrirasyidi avatar Jun 05 '23 08:06 amrirasyidi

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

danwlsn avatar Jul 25 '23 13:07 danwlsn

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.

gruvw avatar May 16 '24 14:05 gruvw

I guess #88 would automatically solve this as permissions are explicitly requested

williamdes avatar Aug 19 '24 09:08 williamdes