I recently spun up a self-managed gitlab container and am having some issues getting CI/CD working.
For my current setup:
Gitlab hosted in docker (gitlab/gitlab-ce) hosted by Unraid. Current sitting bridged.
Gitlab runner hosted in docker (gitlab/gitlab-runner) hosted by Unraid. Also sitting bridged and passing in my
config.toml file and Unraid
Then I have a relatively simple single project (/root/projectnamehere) with the following
stages: - test tests: stage: test script: - pip install --upgrade pip - pip install -r requirements.txt - python main.py
For my runner configuration I have:
[[runners]] name = "test1" url = "http://192.168.X.XYZ:9080/" token = "<A Shared Token>" clone_url = "http://192.168.X.XYZ/" executor = "docker" [runners.custom_build_dir] [runners.cache] [runners.cache.s3] [runners.cache.gcs] [runners.cache.azure] [runners.docker] tls_verify = false image = "python:3.7.9" privileged = false disable_entrypoint_overwrite = false oom_kill_disable = false disable_cache = false volumes = ["/cache"] shm_size = 0
Originally I had issues with name resolution, hence the addition of the clone_url. However, I now get the following error when attempting to run my job:
Getting source from Git repository
Fetching changes with git depth set to 50...
Reinitialized existing Git repository in /builds/root/projectnamehere/.git/
fatal: unable to update url base from redirection:
asked for: http://gitlab-ci-token:[MASKED]@192.168.X.XYZ/root/projectnamehere.git/info/refs?service=git-upload-pack
ERROR: Job failed: exit code 1
I’ve gone through and rebuilt my runners, I have tried to implement SSH keys (seems like it shouldn’t be necessary?), and use different types of runners (shared, project-specific, etc) and all yield the same issue.
Is there something I’m missing in passing my docker containers? Is there more I need to modify in my config.toml?
Any help is greatly appreciated!