ubuntu - Github action runner 错误 WRITE ERROR : Object reference not set to an instance of an object

标签 ubuntu github-actions cicd github-actions-self-hosted-runners

在 Ubuntu 18 上的 Github 操作自我运行器配置期间,出现错误 Object reference not set to an instance of an object.我使用以下命令来配置它

mkdir actions-runner && cd actions-runner
curl -o actions-runner-linux-x64-2.288.1.tar.gz -L https://github.com/actions/runner/releases/download/v2.288.1/actions-runner-linux-x64-2.288.1.tar.gz
echo "**************  actions-runner-linux-x64-2.288.1.tar.gz" | shasum -a 256 -c
tar xzf ./actions-runner-linux-x64-2.288.1.tar.gz
./config.sh --url https://github.com/irfan/test --token ***********
日志是
[2022-04-10 19:51:52Z INFO CommandSettings] Remove token from Arg dictionary.
[2022-04-10 19:51:53Z ERR  Runner] System.NullReferenceException: Object reference not set to an instance of an object.
at GitHub.Runner.Listener.Configuration.ConfigurationManager.ConfigureAsync(CommandSettings command) at GitHub.Runner.Listener.Runner.ExecuteCommand(CommandSettings command) 
[2022-04-10 19:51:53Z ERR  Terminal] WRITE ERROR: Object reference not set to an instance of an object.
[2022-04-10 19:51:53Z INFO Listener] Runner execution has finished with return code 1

最佳答案

尝试修改存储库的设置以设置新的自托管运行器。这会生成一个新 token ,您可以在运行 config.sh 时使用它,并且出于某种原因可以解决此错误。我不认为 token 仅在一定时间内有效,但这可能就是正在发生的事情。或者考虑到我们在最后一天都遇到了这个问题,这可能是一个临时的 github 问题,但这对我有用。

关于ubuntu - Github action runner 错误 WRITE ERROR : Object reference not set to an instance of an object,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71820139/

相关文章:

bash no abash :/src/github. com/tomnomnom/gf/gf-completion.bash:没有这样的文件或目录

linux - 如何在返回代码 0 时运行 bash 脚本?

Git diff 给了我一个致命的 : bad revision 'HEAD~1'

GitHub 工作流 : one job for each different git actions (push on master, 推送标签...)

amazon-web-services - AWS CodePipeline 角色无权在阶段的 "action" block 中对角色执行 AssumeRole

user-interface - LibreOffice 工具栏和 UI 元素在升级到 5.1 后变得丑陋

Ubuntu find 命令和 printf 参数

github - 检查 GitHub Actions 上的发布标签是否是最新的

amazon-web-services - 我需要运行 cdk bootstrap 多少次?

cicd - Codemagic UI(工作流程编辑器)到 YAML