From 10c27e08102fa0e28ca6a4ac7d2d1e089cdbe9e5 Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Sun, 15 Nov 2026 18:22:44 -0500 Subject: [PATCH] Request packages:write so the automatic token can push the image The login step reached the registry but was refused: Error response from daemon: Get "https://git.clortox.com/v2/": unauthorized The registry is enabled (an unauthenticated /v2/ returns a proper UNAUTHORIZED registry error) and a personal access token authenticates against it, so the automatic token is what lacks the scope. Gitea's automatic token starts read-only, so the workflow now asks for packages:write. The REGISTRY_TOKEN fallback stays, and is preferred when set. --- .gitea/workflows/build.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index eff8203..37ca436 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -42,6 +42,15 @@ env: # The default branch: the only one that also moves `latest`. DEFAULT_BRANCH: master +# Gitea's automatic token starts read-only, and pushing an image needs write +# access to packages. Asking for it here means no deployment has to manage a +# personal access token; an instance that does not grant package scope to the +# automatic token can set a REGISTRY_TOKEN secret instead, which the login step +# prefers whenever it is present. +permissions: + contents: read + packages: write + jobs: container: runs-on: ubuntu-latest