GitLab Runner is using its Docker host's hostname as Git server FQDN/hostname
Neil, it's because the = sign in your /etc/gitlab/gitlab.rb file.

When you'll look on the full comment before the external_url line, you'll see a link to the documentation:

## GitLab URL
##! URL on which GitLab will be reachable.
##! For more details on configuring external_url see:
##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab
external_url 'http://gitlab.example.com'


In the default gitlab.rb file (just after installing the Omnibus GitLab package) and also in the linked documentation you can see, that the external_url value is assigned without the = sign. It's done like that because the external_url is a method, not a variable. So here you're not assigning the value, but calling the method with this value. Ruby allows to call a method without brackets around the arguments, and this is a commonly used pattern when designing a DSLs based on Ruby.

When you try to set the value with:

external_url = 'https://server:actual-fqdn-of-gitlab-server-where-git-repo-is'


then the external_url method is not receiving any argument and in that case Omnibus GitLab falls back to a default value which is based on host's hostname.

In most cases the hostname of the server where GitLab is installed will be the same as the hostname that the server is accessible with. In some cases - including yours - the external_url needs to be set explicitly.

So the solution seems to be:


Change external_url = 'URL_HERE' to external_url 'URL_HERE'
Execute sudo gitlab-ctl reconfigure


This should set the proper values in gitlab.yml file and resolve your problems.