PedroPicateclas
PedroPicateclas

Reputation: 25

failed to connect to gitlab port 443 in pipeline

I installed my gitlab in a raspberrypi4 and configure my gitlab runner in a VirtalBox VM.

when y run my pipeline:

Fetching changes with git depth set to 20...
Initialized empty Git repository in /builds/root/testing/.git/
Created fresh repository.
fatal: unable to access 'https://rpi.local/root/testing.git/': Failed to connect to rpi.local port 443 after 11 ms: Connection refused
ERROR: Job failed: exit code 1

The gitlab url is http://rpi.local and configure in /etc/gitlab/gitlab.rb

The runner is a ubuntu VM.

The config.toml:

concurrent = 1
check_interval = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "vlab"
  url = "http://rpi.local"
  token = "..."
  executor = "docker"
  dns_search = ["rpi.local"]
  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
    [runners.cache.azure]
  [runners.docker]
    tls_verify = false
    image = "alpine:latest"
    privileged = false
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache/"]
    shm_size = 0

The pipeline:

stages:
  - build

build-job:
   stage: build
   tags:
     - ubuntu
   script:
     - echo "Compiling the code..."
     - echo "Compile complete."

The problem is that it is changing my url to https but I don't know why or how to change it.

Any ideas?

Upvotes: 1

Views: 3846

Answers (1)

sytech
sytech

Reputation: 40861

Use the clone_url configuration parameter in your runner config.toml

[[runners]]
# ...
clone_url = "http://rpi.local"
# ...

Upvotes: 1

Related Questions