[英]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.我正在尝试在 ubuntu 中设置 GitHub 操作。 I made a folder and install the runner using my root account.我创建了一个文件夹并使用我的 root 帐户安装了运行器。 Now, this is how permissions look like.现在,这就是权限的样子。
When I tried to run sudo./config.sh --url https://github.com/user/api --token supersecret
当我尝试运行sudo./config.sh --url https://github.com/user/api --token supersecret
It gives me the error它给了我错误
Must not run with sudo不得使用 sudo 运行
The solution most people say is that export RUNNER_ALLOW_RUNASROOT="1"
and then run the command.大多数人说的解决方案是export RUNNER_ALLOW_RUNASROOT="1"
然后运行命令。 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.还有一些人说创建一个非root用户并尝试运行。 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.我遇到了同样的问题,每次 Google 搜索都会显示export RUNNER_ALLOW_RUNASROOT="1"
解决方案,但它不起作用。
The command GitHub gives you is: ./config.sh --url [url] --token [supersecret] GitHub 给你的命令是:./config.sh --url [url] --token [supersecret]
But I keep receiving: Must not run with sudo但我一直收到:不得使用 sudo 运行
And the only solution does nothing.唯一的解决方案什么也不做。
I did it this way to run env ❯ sudo env RUNNER_ALLOW_RUNASROOT="1"./run.sh
我这样做是为了运行 env ❯ sudo env RUNNER_ALLOW_RUNASROOT="1"./run.sh
for the config just keep the same pattern, put the env
at the beginning.对于配置,只需保持相同的模式,将env
放在开头。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.