Gitlab-runner can't connect to gitlab to clone a repo

Hi there,

I have the following error
fatal: unable to access ‘http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@{host}/rubemlrm/project.git/’: Failed to connect to {Host} port 80: Host is unreachable

I’ve tried force using the --clone-url option but i’m always getting this error. I have the following system implemented:

  • Gitlab running in docker
  • gitlab runner pointing to the subdomain of gitlab
  • nginx reverse proxy that redirects the subdomain request to an internal mapped port that gives acess to gitlab, this port is internal only and don’t have any connection to external requests.

Have you checked the DNS inside the runner container, e.g. ping?

i’ve checked that and can ping the gitlab docker from the gitlab-runner container.

Is the “gitlab docker” equal to “{host}”?

Try to docker exec into the runner container and run a git clone to the same URL you mentioned in your first post.

Same issue here.

“Host is unreachable” when I run a job.

I can get into the gitlab-runner container and ping my url just fine.

Anyone find a solution?