0

I downloaded gitlab-runner.exe file and need to share this file for accessories from any place on the disk.

So, I created an environment variable, using UI:

enter image description here

Also, I created an environment, using CLI:

set gitlab-runnner=d:\GitlubRunner\gitlab-runner.exe

But I still can't accept the gitlab-runner.exe from the other folder. Now is available for me only:

%GitLab_Runner%
%gitlab-runner%

enter image description here

  • Neet to add: the environment that I created by CLI (%gitlab-runner%) not works after rebooting

1 Answers1

1

But I still can't accept the GitLab-runner.exe from the other folder.

You need to update the PATH system environment variable to include a path to this executable. You indicated that %gitlab_runner% is working, which is an indication, your system variable GITLAB_RUNNER system variable is configured properly.

However, you have a conflicting system variable that should be removed, it's necessary to define GITLUB_RUNNER as a user and system variable. You really should delete both of those system variables, and only create user system variables, unless this machine is used by multiple users. If that is the case, then the user variables should be deleted, and only the system variables used.

You can still create a user variable GITLAB_RUNNER so you can use %GITLAB_RUNNER% in a script to execute the executable.

Need to add: the environment that I created by CLI (%gitlab-runner%) not works after rebooting

You have not made a GITLAB-RUNNER environmental variable. So %gitlab-runner% won't work until you do. However, the reason your unable to launch GitLab-runner.exe from any directory is due to the PATH variable still not containing a the not being updated to include d:\GitlubRunner\

Ramhound
  • 42,708
  • Sorry, but %gitlab_runner% doesn't work after rebooting...gitlab-runner also – Valentyn Hruzytskyi Nov 26 '20 at 16:09
  • @ValentynHruzytskyi - Except indicated it was working in your question. I presumed %gitlab-runner% was actually supposed to be %gitlab_runner% due to your previous and numerous typographical mistakes. – Ramhound Nov 26 '20 at 16:10
  • But %GITLAB_RUNNER% works fine... – Valentyn Hruzytskyi Nov 26 '20 at 16:10
  • 1
    @ValentynHruzytskyi - You don't have a system variable named gitlab-runner only gitlab_runner Please fix your screenshot to reflect the actual state of your system currently. I am willing to update my answer, but due to the numerous typographical mistakes it impossible to tell what variables actually exist currently. – Ramhound Nov 26 '20 at 16:12