act_runner won't start on permission denied #12765

Closed
opened 2025-11-02 10:20:18 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @asitemade4u on GitHub (Mar 30, 2024).

Description

  • I have installed act_runner according to your instructions (last version)
  • The runner is registered at the installation level of Gitea (last version)
  • But when I execute ./act_runner daemon I get the following error:
NFO[2024-03-30T19:40:52-04:00] Starting runner daemon                       
ERRO[2024-03-30T19:40:52-04:00] fail to invoke Declare                        error="permission_denied: 403 Forbidden"
Error: permission_denied: 403 Forbidden

What am I doing wrong?
S.

Gitea Version

1.21.10 built with GNU Make 4.4.1, go1.21.8

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

N/A: does not concern Gitea but Gitea Actions and, more specifically, the runner

Screenshots

No response

Git Version

2.40.1

Operating System

CentOS 9

How are you running Gitea?

docker, here is the docker-compose.yml file

version: "3.9"

services:
  gitea:
    image: gitea/gitea:latest
    container_name: gitea
    restart: unless-stopped
    ports:
      - "3000:3000"
      - "127.0.0.1:2222:22"
    environment:
      - USER_GID=981
      - USER_UID=987
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
      - /home/git/.ssh:/data/.ssh
      - /zfs212/gta/gitea:/data/gitea
      - /zfs212/git:/data/git

networks:
  default:
    name: lsio
    external: true

Database

PostgreSQL

Originally created by @asitemade4u on GitHub (Mar 30, 2024). ### Description - I have installed act_runner according to your instructions (last version) - The runner is registered at the installation level of Gitea (last version) - But when I execute `./act_runner daemon` I get the following error: ```error NFO[2024-03-30T19:40:52-04:00] Starting runner daemon ERRO[2024-03-30T19:40:52-04:00] fail to invoke Declare error="permission_denied: 403 Forbidden" Error: permission_denied: 403 Forbidden ``` What am I doing wrong? S. ### Gitea Version 1.21.10 built with GNU Make 4.4.1, go1.21.8 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist N/A: does not concern Gitea but Gitea Actions and, more specifically, the runner ### Screenshots _No response_ ### Git Version 2.40.1 ### Operating System CentOS 9 ### How are you running Gitea? docker, here is the `docker-compose.yml` file ```yaml version: "3.9" services: gitea: image: gitea/gitea:latest container_name: gitea restart: unless-stopped ports: - "3000:3000" - "127.0.0.1:2222:22" environment: - USER_GID=981 - USER_UID=987 volumes: - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro - /home/git/.ssh:/data/.ssh - /zfs212/gta/gitea:/data/gitea - /zfs212/git:/data/git networks: default: name: lsio external: true ``` ### Database PostgreSQL
GiteaMirror added the issue/needs-feedback label 2025-11-02 10:20:18 -06:00
Author
Owner

@lunny commented on GitHub (Mar 31, 2024):

How did you run your runners? And what's the Gitea domain given to the runners?

@lunny commented on GitHub (Mar 31, 2024): How did you run your runners? And what's the Gitea domain given to the runners?
Author
Owner

@asitemade4u commented on GitHub (Mar 31, 2024):

Thank you for the prompt response.

  • I used both the act_runner daemon and the systemd service-based launches with the same outcome. I tried with users root and git
  • The Gitea domain given was my own self-hosted Gitea's domain, https://gitea.[obfuscated].net
  • I tried installing the act_runner executable at different locations: /root, /user/local/bin

When registering act_runner, everything goes fine and my local instance of Gitea is well recognized. The error occurs when launching the daemon.
As a result, the runner:

  • is displayed alright in the Actions page of my Gitea instance
  • but is always in an offline state
@asitemade4u commented on GitHub (Mar 31, 2024): Thank you for the prompt response. - I used both the `act_runner daemon` and the `systemd` service-based launches with the same outcome. I tried with users `root` and `git` - The Gitea domain given was my own self-hosted Gitea's domain, `https://gitea.[obfuscated].net` - I tried installing the `act_runner` executable at different locations: `/root`, `/user/local/bin` When registering `act_runner`, everything goes fine and my local instance of Gitea is well recognized. The error occurs when launching the daemon. As a result, the runner: - is displayed alright in the Actions page of my Gitea instance - but is always in an `offline` state
Author
Owner

@asitemade4u commented on GitHub (Mar 31, 2024):

I have a hunch the issue deals with Linux access rights and the user. I just noticed an act_runner user was created on my working computer where I tried it too.
Do I need to set the access rights of the config.yaml file to that user too?

@asitemade4u commented on GitHub (Mar 31, 2024): I have a hunch the issue deals with Linux access rights and the user. I just noticed an `act_runner` user was created on my working computer where I tried it too. Do I need to set the access rights of the `config.yaml` file to that user too?
Author
Owner

@GiteaBot commented on GitHub (Apr 30, 2024):

We close issues that need feedback from the author if there were no new comments for a month. 🍵

@GiteaBot commented on GitHub (Apr 30, 2024): We close issues that need feedback from the author if there were no new comments for a month. :tea:
Author
Owner

@lunny commented on GitHub (May 1, 2024):

I have a hunch the issue deals with Linux access rights and the user. I just noticed an act_runner user was created on my working computer where I tried it too. Do I need to set the access rights of the config.yaml file to that user too?

I think yes. You need to set all act_runner related files owner to the user who run the program.

@lunny commented on GitHub (May 1, 2024): > I have a hunch the issue deals with Linux access rights and the user. I just noticed an `act_runner` user was created on my working computer where I tried it too. Do I need to set the access rights of the `config.yaml` file to that user too? I think yes. You need to set all act_runner related files owner to the user who run the program.
Author
Owner

@GiteaBot commented on GitHub (May 31, 2024):

We close issues that need feedback from the author if there were no new comments for a month. 🍵

@GiteaBot commented on GitHub (May 31, 2024): We close issues that need feedback from the author if there were no new comments for a month. :tea:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12765