fix: Gitea Actions secrets — GITEA_ prefix reserved, add provisioning sync #230

Closed
opened 2026-03-25 04:48:08 +00:00 by kert · 1 comment
Owner

Problem

Gitea reserves the GITEA_ prefix for Actions secrets. secrets.GITEA_TOKEN resolved to empty, causing 401 reqPackageAccess on all 28 package uploads.

Root cause

  1. Gitea Actions secret API rejects names starting with GITEA_
  2. Provisioning system syncs secrets to Woodpecker but not Gitea Actions

Fix

  • Rename secret to DEPLOY_TOKEN (maps to GITEA_TOKEN env var in workflows)
  • Add provision_gitea_actions() to src/api/auth/provision.py
  • Wire into both provision() and bootstrap() flows
  • Update all workflow generators to use secrets.DEPLOY_TOKEN
  • Set DEPLOY_TOKEN secret via API immediately to unblock CI
## Problem Gitea reserves the `GITEA_` prefix for Actions secrets. `secrets.GITEA_TOKEN` resolved to empty, causing 401 reqPackageAccess on all 28 package uploads. ## Root cause 1. Gitea Actions secret API rejects names starting with `GITEA_` 2. Provisioning system syncs secrets to Woodpecker but not Gitea Actions ## Fix - Rename secret to `DEPLOY_TOKEN` (maps to `GITEA_TOKEN` env var in workflows) - Add `provision_gitea_actions()` to `src/api/auth/provision.py` - Wire into both `provision()` and `bootstrap()` flows - Update all workflow generators to use `secrets.DEPLOY_TOKEN` - Set `DEPLOY_TOKEN` secret via API immediately to unblock CI
Author
Owner

Fixed in f6f47b9. Same fix as #229 — see that issue for details.

Additional work:

  • GITEA_ACTIONS_SECRET_MAP in provision.py maps DEPLOY_TOKEN → GITEA_TOKEN, REGISTRY_USER → GITEA_ADMIN_USER, REGISTRY_TOKEN → GITEA_ADMIN_PASSWORD
  • Uses Gitea API PUT /repos/{owner}/{repo}/actions/secrets/{name} to create/update secrets
  • Provisioning now covers all 3 CI backends: Woodpecker (existing), Gitea Actions (new), GitHub Actions (uses same Gitea API when deployed there)

Verified: CI + deploy green.

Fixed in `f6f47b9`. Same fix as #229 — see that issue for details. Additional work: - `GITEA_ACTIONS_SECRET_MAP` in provision.py maps `DEPLOY_TOKEN` → `GITEA_TOKEN`, `REGISTRY_USER` → `GITEA_ADMIN_USER`, `REGISTRY_TOKEN` → `GITEA_ADMIN_PASSWORD` - Uses Gitea API `PUT /repos/{owner}/{repo}/actions/secrets/{name}` to create/update secrets - Provisioning now covers all 3 CI backends: Woodpecker (existing), Gitea Actions (new), GitHub Actions (uses same Gitea API when deployed there) **Verified:** CI + deploy green.
kert closed this issue 2026-03-25 05:15:59 +00:00
Sign in to join this conversation.