DEV Community

Discussion on: Deploy your projects to Github Pages with GitHub Actions

Collapse
 
swinton profile image
Steve Winton

Nice write up!

I think ${{ secrets.ACCESS_TOKEN }} in your example can be replaced with ${{ secrets.GITHUB_TOKEN }}, which is a repo-scoped token automatically generated for you by GitHub. Did you try this?

Collapse
 
pierresaid profile image
pierresaid • Edited

Thanks!

I just tried it, but it didn't work.
Also, I couldn't find the documentation about this auto generated token.

Collapse
 
swinton profile image
Steve Winton

Hmmm. It’s documented here:

help.github.com/en/articles/virtua...

But maybe it doesn’t carry the right permissions for your use case. Did you get a permissions error?

Thread Thread
 
pierresaid profile image
pierresaid

When the Action try to push the changes, it pops this error in the logs:

fatal: could not read Password for 'https://***@github.com': No such device or address

That must be a permissions error. The personal access token that I generated before (ACCESS_TOKEN) had full control of my private repositories.