Skip to content

Cannot automate Gitea Actions runner registration - CLI generated tokens not recognized #34664

Closed
@cmxela

Description

@cmxela

Description

I'm trying to automate the deployment of Gitea Actions runners in a Kubernetes environment, but I'm encountering an issue where tokens generated via the CLI command are not recognized by the runner.

Current Behavior

  1. Running gitea actions generate-runner-token successfully generates a token
  2. When the act_runner tries to use this token, it fails with: runner registration token not found
  3. The documentation states that registration tokens should be obtained from the web UI at /admin/actions/runners

Expected Behavior

The CLI-generated token should work for runner registration, enabling fully automated deployments without manual web UI interaction.

Steps to Reproduce

  1. Deploy Gitea 1.22.3 with Actions enabled:
[actions]
ENABLED = true
DEFAULT_ACTIONS_URL = https://gitea.com
  1. Generate a runner token via CLI:
gitea --config /data/gitea/conf/app.ini actions generate-runner-token
  1. Try to register a runner with the generated token:
act_runner register --no-interactive --instance https://git.example.com --token <generated-token> --name runner-1
  1. Runner fails with: runner registration token not found

Environment

  • Gitea Version: 1.22.3
  • act_runner Version: 0.2.11
  • Deployment: Kubernetes (MicroK8s)
  • OS: Ubuntu 24.04

Use Case

This is blocking automated CI/CD deployments where runners need to be provisioned without manual intervention. In Kubernetes environments, it's common to deploy all components via manifests/operators without requiring manual web UI steps.

Possible Solutions

  1. Make CLI-generated tokens work with runner registration
  2. Add an API endpoint to retrieve registration tokens (similar to Add API endpoint to get token for registering runners for repos #23761 but for instance-level runners)
  3. Document how to retrieve the registration token programmatically for automation scenarios

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detailtopic/gitea-actionsrelated to the actions of Gitea

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions