fatal: failed to start gitlab-runner: access is denied
Asked Answered
Y

5

5

When I try to install gitlab runner I get the error message below:

Microsoft Windows (Version 18618362778) 
(c) 2019 Microsoft Corporation. All rights reserved.

C:\gitlab runner>gitlab-runner.exe install 
Runtime platform arch=i386 windows pid-11732 revision=4c96e5ad version-12.9.6
FATAL: Failed to install gitlab-runner: Access is denied.

C:\gitlab_runner

I need to know how to fix this and why this appears.

Yahairayahata answered 19/4, 2020 at 19:49 Comment(1)
Did you follow the steps in docs.gitlab.com/runner/install/windows.html#installation? Specifically, step 3, which tells you to run an elevated prompt (open it as an administrator).Hulbert
A
13

GO to cmd --> rightclick as "administrator" type the command as gitlab-runner.exe install

Alto answered 13/7, 2020 at 9:57 Comment(0)
E
1

I encountered this problem before and this is how I solved it:

steps:

  1. click Window(key) + x
  2. Select "Terminal (Admin)"
  3. go to the \GitLab-Runner directory.

steps above should have solved the problem, and then continue with the next steps 4., 5., ... 4. paste this -> .\gitlab-runner.exe install 5. and then paste this -> .\gitlab-runner.exe start

Hope it solves the problem.

Encomium answered 14/6, 2023 at 9:56 Comment(1)
Hi Hendran, welcome to StackOverflow. Could you edit your answer to include where to find the 4th and 5th step? If it's a step by step guide, the link is enough.Premillenarian
M
0

There has been similar error before: gitlab-org/gitlab-runner issue 1265 ("Failed to install gitlab-runner service on Windows")

That leads to the merge request 223 "Windows installation, added a precision on the install command", which is not directly your case.

But that same issue includes:

Since gitlab-ci-multi-runner install is intended to be run as Administrator, it seems like the GitLab runner could add this privilege to the account also.

So make sure first you are executing this command in a CMD console launched with an Administrator account.

Mil answered 19/4, 2020 at 20:17 Comment(0)
E
0

The documentation for installing GitLab Runner on Windows is here: https://docs.gitlab.com/runner/install/windows.html

Step 3 is to open up an elevated PowerShell session (using "Run as Administrator" to start PowerShell).

Emphasize answered 20/4, 2020 at 1:29 Comment(0)
P
0

Renamed my binary filename to gitlab-runner.exe (As given in https://docs.gitlab.com/runner/install/windows.html) I did gitlab-runner.exe install Then to check to version that got installed ,I was required to do gitlab-runner --version It did not show the version. Received an error message Then I observed that my file extension was gitlab-runner.exe.exe I modified it to gitlab-runner.exe. The version command worked and displayed the gitlab-runner version Now, I tried to do gitlab-runner.exe start and in the process received the error message Failed to start gitlab-runner: The system cannot find the file specified.

I reverted the file extension from gitlab-runner.exe to gitlab-runner.exe.exe Now I tried gitlab-runner.exe start and it worked !!

Pinto answered 28/7, 2022 at 21:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.