Skip to content

Error adding a runner #9

Description

@semsitivity

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 ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions