gitlab-docker-letsencrypt icon indicating copy to clipboard operation
gitlab-docker-letsencrypt copied to clipboard

Error adding a runner

Open semsitivity opened this issue 1 year ago • 0 comments

Hi, I tried to add a runner by adding this in the docker-compose.yml:

gitlab-runner1: image: gitlab/gitlab-runner:latest restart: always container_name: gitlab-runner1 hostname: gitlab-runner1 depends_on: - gitlab-letsencrypt volumes: - ./config/gitlab-runner:/etc/gitlab-runner - /var/run/docker.sock:/var/run/docker.sock networks: - default

I then run a script to register the running like this: registration_token=xxxxxxxxxxxxxxx url=http://gitlab-letsencrypt

docker exec -it gitlab-runner1
gitlab-runner register
--non-interactive
--registration-token ${registration_token}
--locked=false
--description docker-stable
--url ${url}
--executor docker
--docker-image docker:stable
--docker-volumes "/var/run/docker.sock:/var/run/docker.sock"
--docker-network-mode default And it runs and registers successfully.

The thing is that the runner systematically fails any jobs with the following error:

Running on runner-94ds8ayaf-project-1-concurrent-0 via gitlab-runner1... Getting source from Git repository 00:01 Fetching changes with git depth set to 20... Reinitialized existing Git repository in /builds/doc-editor/xxxxxxxxxxxxxxxxx/.git/ remote: HTTP Basic: Access denied. The provided password or token is incorrect or your account has 2FA enabled and you must use a personal access token instead of a password. See https://xxxxxxxxxxxxxx/help/topics/git/troubleshooting_git#error-on-git-fetch-http-basic-access-denied fatal: Authentication failed for 'http://xxxxxxxxxxxxxxxxxxxx.git/' ERROR: Job failed: exit code 1

I also tried to use an extra_host in the docker-compose.yml to force to use the public ip address and then to be able to use the https endpoint...but I got the same error. Did you already experienced this kind of issue and managed to find a solution ?

semsitivity avatar Oct 05 '23 21:10 semsitivity