简体   繁体   中英

Github actions can not run the config.sh file in the ubuntu 20.04

I am trying to set up the GitHub actions in ubuntu. I made a folder and install the runner using my root account. Now, this is how permissions look like.

在此处输入图像描述

When I tried to run sudo./config.sh --url https://github.com/user/api --token supersecret

It gives me the error

Must not run with sudo

The solution most people say is that export RUNNER_ALLOW_RUNASROOT="1" and then run the command. But this widely accepted solution is not working for me for some reason.

And some others say create a non-root user and try to run. I tried that way too. It ends up with more errors.

How do I fix this?

I am having this same issue, and every Google search brings up the export RUNNER_ALLOW_RUNASROOT="1" solution, which doesn't work.

The command GitHub gives you is: ./config.sh --url [url] --token [supersecret]

But I keep receiving: Must not run with sudo

And the only solution does nothing.

I did it this way to run env ❯ sudo env RUNNER_ALLOW_RUNASROOT="1"./run.sh

for the config just keep the same pattern, put the env at the beginning.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM