From 9d19de50cbee8cb02304bde374bfb87c37a7f27d Mon Sep 17 00:00:00 2001 From: Zakaria El Orche Date: Wed, 12 Aug 2026 19:50:58 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20request=20packages:write=20=E2=80=94=20re?= =?UTF-8?q?po's=20default=20Actions=20token=20is=20read-only?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Deploy failed with 401 Unauthorized: this repo's default Actions token permission mode is Restricted (read-only on packages, not Permissive), so the auto-provided GITEA_TOKEN couldn't push to the Maven registry without explicitly requesting write access. Co-Authored-By: Claude Sonnet 5 --- .gitea/workflows/publish-maven.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitea/workflows/publish-maven.yml b/.gitea/workflows/publish-maven.yml index d0ae0a5..dd22dbf 100644 --- a/.gitea/workflows/publish-maven.yml +++ b/.gitea/workflows/publish-maven.yml @@ -17,6 +17,11 @@ on: jobs: publish: runs-on: ubuntu-latest + # Deploy got a 401 without this: this repo's default Actions token permission mode is + # Restricted (read-only on packages), not Permissive — see + # https://docs.gitea.com/usage/actions/token-permissions. + permissions: + packages: write # No actions/checkout here on purpose: it's a Node-based action, and this container # (chosen for its preinstalled mvn/JDK 21) has no Node — checkout would fail with # "node: executable file not found". A plain git clone needs neither.