Runner registration token via API is broken for repo level runners #13332

Closed
opened 2025-11-02 10:38:48 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @floriankessler on GitHub (Jul 26, 2024).

Description

While I can obtain a token through an "undocumented" API call, using it results in broken runner behavior.

  1. Retrieving a token via /repos/{owner}/{repo}/runners/registration-token, as referenced in ${GITEA_URL}/api/swagger, returns a 404 error.

  2. By examining related API calls, I added /actions to the endpoint. This adjustment does return a token for a runner mapped to a repository, but it differs from the token displayed in the repository's Actions settings in the web UI.

Moreover, using this token allows the registration of a runner. However, it will only process the first job assigned after a restart.

Gitea Version

1.22-rootless

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/floriankessler/b7b3a141b11edd34e8867f423ddd3acb

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

see gist

Database

SQLite

Originally created by @floriankessler on GitHub (Jul 26, 2024). ### Description While I can obtain a token through an "undocumented" API call, using it results in broken runner behavior. 1. Retrieving a token via `/repos/{owner}/{repo}/runners/registration-token`, as referenced in `${GITEA_URL}/api/swagger`, returns a 404 error. 2. By examining related API calls, I added `/actions` to the endpoint. This adjustment does return a token for a runner mapped to a repository, but it differs from the token displayed in the repository's Actions settings in the web UI. Moreover, using this token allows the registration of a runner. However, it will **only process the first job assigned after a restart.** ### Gitea Version 1.22-rootless ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist https://gist.github.com/floriankessler/b7b3a141b11edd34e8867f423ddd3acb ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? see gist ### Database SQLite
GiteaMirror added the topic/gitea-actionstype/bug labels 2025-11-02 10:38:48 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13332