How to use gitlab without hostname

gitlab

I'm using gitlab within my company network. We don't have any internal DNS set up to allow me to use internal hostnames – all access to servers is via IP only.

I used the omnibus installer to install gitlab on a dedicated VM.

Currently I'm having to set the hosts files on my client machines to point to the IP address of the gitlab server. Is there a way to just use the IP address of the machine for gitlab?

I've tried to set it up using the IP address as external_url in gitlab.yml but no gitlab pages are served when I visit it using the IP, and I'm unable to check out any git repos using the IP.

Is it possible? If so, what settings do I need to look at?

Best Answer

If you have set up the client's hosts file anyway, then why stick to the IP?

If you don't have an internal DNS, get one. They're cool. As your use case seems to be managing internal names only without connection to the outside world, using a DNS proxy like dnsmasq would suit your needs, and it's fairly easy to set up.

Managing your client's hosts file with SCCM or Puppet might be an option too.

Related Topic