CI: registry push fails with unauthorized #3

Closed
opened 2026-07-06 11:53:38 +02:00 by ffaerber · 11 comments
Owner

@pm the build-and-push workflow failed on main (run 716): the registry login step gets Get "…/v2/": unauthorized.

Root cause: this Gitea's container registry does not accept the internal Actions token (GITHUB_TOKEN), and packages under ffaerber/* can only be written by ffaerber. A dedicated secret now exists for this: REGISTRY_TOKEN (ffaerber-owned PAT, scope write:package, already verified against the registry).

Required changes to .gitea/workflows/build.yml:

  1. Login step: username: ffaerber, password: ${{ secrets.REGISTRY_TOKEN }}.
  2. runs-on: ubuntu-latestruns-on: ci-runner (this instance's runner label).
  3. run-name uses ${gitea.ref_name} which renders literally — use proper ${{ … }} expression syntax or drop the run-name.

After merge, the push to main should produce a green build and the image git.ffaerber.duckdns.org/ffaerber/homepage:latest.

@pm the `build-and-push` workflow failed on main (run 716): the registry login step gets `Get "…/v2/": unauthorized`. Root cause: this Gitea's container registry does not accept the internal Actions token (`GITHUB_TOKEN`), and packages under `ffaerber/*` can only be written by ffaerber. A dedicated secret now exists for this: **`REGISTRY_TOKEN`** (ffaerber-owned PAT, scope write:package, already verified against the registry). Required changes to `.gitea/workflows/build.yml`: 1. Login step: `username: ffaerber`, `password: ${{ secrets.REGISTRY_TOKEN }}`. 2. `runs-on: ubuntu-latest` → `runs-on: ci-runner` (this instance's runner label). 3. `run-name` uses `${gitea.ref_name}` which renders literally — use proper `${{ … }}` expression syntax or drop the run-name. After merge, the push to main should produce a green build and the image `git.ffaerber.duckdns.org/ffaerber/homepage:latest`.
Collaborator

I will update .gitea/workflows/build.yml to use the REGISTRY_TOKEN secret for authentication, switch the runner to ci-runner, and fix the run-name expression syntax. Since these are low-risk configuration changes, @junior will handle the implementation.

@ffaerber ready to start building? reply yes to proceed.

🔧 0 tool calls · in 9386 · out 79 · subscription

(no tool calls — text-only reply)

tokens — input 9386 (fresh 9386 · cache 0w / 0r) · output 79 · reasoning 0 · subscription

I will update `.gitea/workflows/build.yml` to use the `REGISTRY_TOKEN` secret for authentication, switch the runner to `ci-runner`, and fix the `run-name` expression syntax. Since these are low-risk configuration changes, @junior will handle the implementation. @ffaerber ready to start building? reply yes to proceed. <details> <summary>🔧 0 tool calls · in 9386 · out 79 · subscription</summary> _(no tool calls — text-only reply)_ <sub>tokens — input 9386 (fresh 9386 · cache 0w / 0r) · output 79 · reasoning 0 · **subscription**</sub> </details> <!-- 🤖 agent reply — do not trigger -->
Author
Owner

@pm yes, go ahead.

@pm yes, go ahead.
Collaborator

Handing off to @junior.

🔧 0 tool calls · in 9573 · out 7 · subscription

(no tool calls — text-only reply)

tokens — input 9573 (fresh 9573 · cache 0w / 0r) · output 7 · reasoning 0 · subscription

Handing off to @junior. <details> <summary>🔧 0 tool calls · in 9573 · out 7 · subscription</summary> _(no tool calls — text-only reply)_ <sub>tokens — input 9573 (fresh 9573 · cache 0w / 0r) · output 7 · reasoning 0 · **subscription**</sub> </details> <!-- 🤖 agent reply — do not trigger -->
Collaborator

@junior please proceed with issue #3 per my plan above.

@junior please proceed with issue #3 per my plan above.
Collaborator

🔨 Building on branch ai/issue-3 — I'll open a PR when it's ready.

🔨 Building on branch [`ai/issue-3`](https://git.ffaerber.duckdns.org/ffaerber/homepage/src/branch/ai/issue-3) — I'll open a PR when it's ready. <!-- 🤖 agent reply — do not trigger -->
Collaborator

@pm — PR #4 is ready for review (issue #3).

@pm — PR #4 is ready for review (issue #3).
Collaborator

PR #4 is ready for review. Handing it over to @qa.

🔧 0 tool calls · in 9789 · out 24 · subscription

(no tool calls — text-only reply)

tokens — input 9789 (fresh 9789 · cache 0w / 0r) · output 24 · reasoning 0 · subscription

PR #4 is ready for review. Handing it over to @qa. <details> <summary>🔧 0 tool calls · in 9789 · out 24 · subscription</summary> _(no tool calls — text-only reply)_ <sub>tokens — input 9789 (fresh 9789 · cache 0w / 0r) · output 24 · reasoning 0 · **subscription**</sub> </details> <!-- 🤖 agent reply — do not trigger -->
Collaborator

@qa please review PR #4 for issue #3 — put your recommendations on the PR, or approve.

@qa please review PR #4 for issue #3 — put your recommendations on the PR, or approve.
Collaborator

Reviewed PR #4 — looks good.

✅ Reviewed PR #4 — looks good. <!-- 🤖 agent reply — do not trigger -->
Collaborator

@pm — I have reviewed and approved PR #4 (issue #3). Over to you.

@pm — I have reviewed and approved PR #4 (issue #3). Over to you.
Collaborator

PR #4 is reviewed and ready to merge, @ffaerber.

🔧 0 tool calls · in 9983 · out 16 · subscription

(no tool calls — text-only reply)

tokens — input 9983 (fresh 9983 · cache 0w / 0r) · output 16 · reasoning 0 · subscription

PR #4 is reviewed and ready to merge, @ffaerber. <details> <summary>🔧 0 tool calls · in 9983 · out 16 · subscription</summary> _(no tool calls — text-only reply)_ <sub>tokens — input 9983 (fresh 9983 · cache 0w / 0r) · output 16 · reasoning 0 · **subscription**</sub> </details> <!-- 🤖 agent reply — do not trigger -->
Sign in to join this conversation.
4 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ffaerber/homepage#3