From fe192ce5e229a87d46e0933c1c421d0d861e6068 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Wed, 19 Feb 2025 22:12:00 +0000 Subject: [PATCH] self-hosted-runner: run the Actions runner under the SYSTEM account Previously, the Actions runner was run under the `NT AUTHORITY\NETWORK SERVICE` account, which lacks the permissions to install Git for Windows. However, that is precisely what the `git-artifacts` workflow is supposed to do. Tweaking the `./config.cmd` invocation by adding `--windowslogonaccount "NT AUTHORITY\SYSTEM"`` fixes the issue. Signed-off-by: Dennis Ameling Signed-off-by: Johannes Schindelin --- azure-self-hosted-runners/post-deployment-script.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-self-hosted-runners/post-deployment-script.ps1 b/azure-self-hosted-runners/post-deployment-script.ps1 index b663274c..dc26eb58 100644 --- a/azure-self-hosted-runners/post-deployment-script.ps1 +++ b/azure-self-hosted-runners/post-deployment-script.ps1 @@ -275,7 +275,7 @@ If ($Ephemeral -ne 'true') { } Write-Output "Configuring the runner" -cmd.exe /c "${GitHubActionsRunnerPath}\config.cmd" --unattended $EphemeralOption --name ${GithubActionsRunnerName} --runasservice --labels $($GitHubAction.RunnerLabels) --url ${GithubActionsRunnerRegistrationUrl} --token ${GitHubActionsRunnerToken} +cmd.exe /c "${GitHubActionsRunnerPath}\config.cmd" --unattended $EphemeralOption --name ${GithubActionsRunnerName} --windowslogonaccount "NT AUTHORITY\SYSTEM" --runasservice --labels $($GitHubAction.RunnerLabels) --url ${GithubActionsRunnerRegistrationUrl} --token ${GitHubActionsRunnerToken} # Ensure that the service was created. If not, exit with error code. if ($null -eq (Get-Service -Name "actions.runner.*")) {