Skip to content

use_pkgdown_github_pages permissions issue #2279

@gregorypenn

Description

@gregorypenn

I realize this is really an issue with GitHub and not with pkgdown itself, but it has prevented me from publishing on GitHub Pages, but I have been unable to find documentation to resolve it, and I'm hoping someone here can help, and possibly add documentation to pkgdown on this topic.

I used usethis::use_pkgdown_github_pages to set up publishing on GitHub pages. When I push a commit to GitHub (no problem with that) it triggers the action to deploy and build the site as expected. The site appears to build successfully, but deployment fails because of a write-access issue. That seems inconsistent with being able to push, so clearly there's something I'm not understanding. The relevant section of the build/deploy log follows. I would greatly appreciate any advice and would gladly write up the solution to go somewhere in pkgdown's documentation if that would be appropriate.

Switched to a new branch 'github-pages-deploy-action/yg1mydceg'
/usr/bin/git commit -m Deploying to gh-pages from @ gregorypenn/BetaBayes@214677f2a17201f8004e29144b58f8613a73e0b0 🚀 --quiet --no-verify
Force-pushing changes...
/usr/bin/git push --force ***github.com/gregorypenn/BetaBayes.git github-pages-deploy-action/yg1mydceg:gh-pages
remote: Write access to repository not granted.
fatal: unable to access 'https://github.com/gregorypenn/BetaBayes.git/': The requested URL returned error: 403
Running post deployment cleanup jobs… 🗑️
/usr/bin/git checkout -B github-pages-deploy-action/yg1mydceg
Reset branch 'github-pages-deploy-action/yg1mydceg'
/usr/bin/chmod -R +rw github-pages-deploy-action-temp-deployment-folder
/usr/bin/git worktree remove github-pages-deploy-action-temp-deployment-folder --force
Error: The deploy step encountered an error: The process '/usr/bin/git' failed with exit code 128 ❌
Notice: Deployment failed! ❌

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions