E

Build error with GitHub Container Registry

Summary

The user is experiencing a build error when trying to push an image to GitHub Container Registry (ghcr.io) after changing their GitHub workflow to log in using GitHub credentials. The error message indicates a "403 Forbidden" status, stating that the installation is not allowed to write to the organization package. The user questions whether this issue is related to passing the --org argument in their Earthfile and seeks clarification on the name of their personal Earthly organization, as their dashboard only mentions it as a personal organization without a specific name.

Status
open
Tags
    Source
    #earthly
      k

      kingboscop

      9/18/2024

      I had this in my GH workflow: docker login --username "$DOCKERHUB_USERNAME" --password "$DOCKERHUB_TOKEN" I realized I need to log into <http://ghcr.io|ghcr.io>, so I replaced that with:

              uses: docker/login-action@v3
              with:
                registry: <http://ghcr.io|ghcr.io>
                username: ${{ github.actor }}
                password: ${{ secrets.GITHUB_TOKEN }}```
      But now I get:
      `Build error: failed to SAVE IMAGE: failed to push <http://ghcr.io/|ghcr.io/>&lt;my-username&gt;/&lt;my-repo-name&gt;:master: unexpected status from POST request to <https://ghcr.io/v2/>&lt;my-username&gt;/&lt;my-repo-name&gt;/blobs/uploads/: 403 Forbidden body={"errors":[{"code":"DENIED","message":"installation not allowed to Write organization package"}]}`
      Why "organization package"? Is it because I'm passing `--org &lt;my-gh-username&gt;` in my `Earthfile`? (`earthly --org &lt;my-gh-username&gt; --sat &lt;my-satellite&gt; --ci --push +docker`)
      *Isn't the `--org` arg only used to specify the Earthly organization?* :thinking_face:
      Btw, what is the name of my personal Earthly organization? In my dashboard, it just says "This is your personal org.Note: For work projects, and to invite team members create an org."