Skip to content

Commit fe192ce

Browse files
dennisamelingdscho
authored andcommitted
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 <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 2413f25 commit fe192ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

azure-self-hosted-runners/post-deployment-script.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ If ($Ephemeral -ne 'true') {
275275
}
276276

277277
Write-Output "Configuring the runner"
278-
cmd.exe /c "${GitHubActionsRunnerPath}\config.cmd" --unattended $EphemeralOption --name ${GithubActionsRunnerName} --runasservice --labels $($GitHubAction.RunnerLabels) --url ${GithubActionsRunnerRegistrationUrl} --token ${GitHubActionsRunnerToken}
278+
cmd.exe /c "${GitHubActionsRunnerPath}\config.cmd" --unattended $EphemeralOption --name ${GithubActionsRunnerName} --windowslogonaccount "NT AUTHORITY\SYSTEM" --runasservice --labels $($GitHubAction.RunnerLabels) --url ${GithubActionsRunnerRegistrationUrl} --token ${GitHubActionsRunnerToken}
279279

280280
# Ensure that the service was created. If not, exit with error code.
281281
if ($null -eq (Get-Service -Name "actions.runner.*")) {

0 commit comments

Comments
 (0)