Lesstep
GitHub Actions · GitHub Packages · Checked November 3, 2026

GitHub Actions: ghcr.io push "denied: permission_denied: write_package"

The registry accepted the token and then refused to write to that package. A successful login says nothing about the package. There are two questions, in this order: does the job's token have packages: write, and is this repository allowed to write to a package that already exists?

What it looks like

Login Succeeded!
...
ERROR: failed to build: failed to solve: failed to push ghcr.io/octo-org/web:1.4.0: denied: permission_denied: write_package

That is docker/build-push-action; docker push and helm push end the same way (mcp-context-forge #7074). For a package of an organization the message can instead be denied: installation not allowed to Write organization package. In October reports that form came mostly from a token with no write at all, and write_package mostly from a package that refused the repository, but both turn up for both causes, so check in the same order.

1. The job's token has no packages: write

jobs:
  image:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write
    steps:
      - uses: docker/login-action@v4
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}
      - uses: docker/build-push-action@v7
        with:
          push: ${{ github.event_name != 'pull_request' }}
          tags: ghcr.io/octo-org/web:${{ github.sha }}

2. The package exists, and this repository may not write to it

With packages: write already set, the package is the problem; godot-mcp had both, logged in with GITHUB_TOKEN, and was refused only at the push (godot-mcp #706). The Container registry documentation says the GITHUB_TOKEN "will not have permission to push the package if you have previously pushed a package to the same namespace, but have not connected the package to the repository". Open the package's settings page and look at "Manage Actions access" and the linked repository. The usual stories:

The ways out

Telling it apart

See failed jobs from IntelliJ IDEA

Pipeline Inbox for GitHub Actions Workflows, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the runs of all your repositories in an IDE tool window, with their jobs and steps, and your current branch's runs are in the status bar. Reading is free; re-running failed jobs, cancelling, running workflows and reviewing deployments are Pro (US$1.50 a month, with a 30-day trial).

GitHub, GitHub Actions and GitHub Packages are trademarks of GitHub, Inc.; Docker is a trademark of Docker, Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with, sponsored or endorsed by GitHub, Inc., Docker, Inc. or JetBrains.

More: "Resource not accessible by integration" · "Permission to ... denied to github-actions[bot]" on git push · "No space left on device" · GitHub Actions plugins for IntelliJ IDEA compared · 日本語