Interview Prep/GitHub Actions/Permissions, Tokens & Secrets

`denied: permission_denied: write_package` when pushing to GHCR.

IntermediateTroubleshootingPermissions, Tokens & Secrets
Answer

Likely causes → Missing packages: write, the package exists but is not linked to this repo (created by another repo or a user), or the image name has uppercase letters.

Diagnose → Package settings, "Manage Actions access" list; check image name casing.

Fix → Add packages: write, grant the repo write access in package settings, lowercase the name (${GITHUB_REPOSITORY,,}).

Prevent → Add org.opencontainers.image.source label so packages link to the repo automatically.

All GitHub Actions questions Roadmap: GitHub Actions

More on Permissions, Tokens & Secrets