Reputation: 49
I'm using Windows 10 and installed gitlab-runner using the Gitlab's doc.
After a successful installation and registration, I try to leave the folderI used to install (C:\Gitlab-Runner
in my instance) and try to run gitlab-runner
. I get the response: 'gitlab-runner' is not recognized as an internal or external command, operable program or batch file.
I am able to run without issue in the C:\Gitlab-Runner
folder, but nowhere else.
Based on the documentation and tutorials I looked at, I wouldn't expect this behavior; am I supposed to?
Upvotes: 4
Views: 6864
Reputation: 179
Please make sure the name of the exe is correct in the folder C:\GitLab-Runner
In my situation, I have the gilab-runner.exe.exe, there was an extra .exe in the file name though its not showing in the directory. enter image description here
Upvotes: 0
Reputation: 49
Solved. I need to call C:/Gitlab-runner/gitlab-runner
rather than just gitlab-runner
in other directories.
Upvotes: 1
Reputation: 785
Did you check to ensure that it was added to The windows environment. You will likely need to update the path variable to include the path that you are using to run the command.
On windows, you add to the PATH variable with the following steps (yanked from google search page):
On the Windows taskbar, right-click the Windows icon and select System.
In the Settings window, under Related Settings, click Advanced system settings. ...
On the Advanced tab, click Environment Variables. ... Click New to create a new environment variable.
Once you've added C:/Gitlab-runner/
to PATH
, I believe you should be able to invoke with gitlab-runner
.
The only thing I'll add is that, for setting PATH
, the last step above is most likely unnecessary, as there will already be a variable named PATH with a list of directories stored in it. Just click EDIT and add your directory to the end of the list. Be sure to add the separator that is used for the others (I believe it's a semicolon on Windows...)
Upvotes: 6