We have installed gitlab runner on redhat server but we can't register it with our gitlab instance as it is protected (we need to login before it shows HTTPS).
When we clone the project repository:
git clone https://domain\.com/project.git
It asks for username and password and if we store credentials in a file or cache like
git config --global credential.helper 'store --file ~/.my-credentials'
it will ask the first time only for authentication when cloning => my-credentials will contains the raw username/password but it solves the problem of being asked for authentification each time.
How can we do the same things with the runner in order to register it to our gitlab : when we run
gitlab-runner register --url http://domain\.com/gitlab/ -r 1TqfdYFsJsdsdLNc-7J
we got immediately the below error without asking us for username/password :
ERROR: Registering runner... failed runner=1TqfdYFs status=401 Unauthorized
PANIC: Failed to register the runner. You may be having network problems.
we know that the runnercan't access our gitlab because of the authentification needed but we don't know how to solve it we tried many things like saving credentials in git cache but it seems that they are not connected or use the same things.
Any ideas please ?