[HELP][SOLVED] How to connect to a gitlab server ran on centos7

Hello sir/madam,

I have successfully installed gitlab on my centos-7 running on a VMbox on a windows-10 server. I would like to connect to this server I installed on centos so I can continue my endeavour to finally continue working on the modifications I’m creating with other developers.

Q-A: I’m here asking because I enjoy the people and try to evolve my expertise in social skills. :slight_smile:

I might have an idea on how to proceed. I need to install git on my pc and create a link or open a port to the git server.


  1. Check VM box network setting to Bridged
  2. Enter a domain or the pc ip at “http://gitlab.example.com
    sudo EXTERNAL_URL=“http://gitlab.example.com” yum install -y gitlab-ee
    I set it to “http://localhost” but I will need to change it once I know how to make it accessible from the web.

Thank you to people in support the effort: nxtgc.ddns.net/cred.html

Hello again!

You should be able to just go to http://<ip-of-centos-vm>:<gitlab-port> in your favorite browser on the windows machine (assuming this is the machine that is hosting the VM).

I think the default port is 8765, but you can check this stuff in /etc/gitlab/gitlab.rb on the centos machine

I don’t know the port. and shouldn’t I get the ip by: ip addr. And shouldn’t the ip be the windows server ip because it is running the centos in a box?


No. Physically, they are the same machine. But logically, they are completely separate. Assuming you have Network Address Translation (NAT) set up right, which you should now that centos has network, then your Windows box is acting as a virtual router for the virtual machines. You created a virtual subnet and the centos box should be in there. Your windows box will probably be something like 192.168.0.X while your VMs will be either 10.0.0.x or 172.16.0.x, or something similar. It can get a little tricky if you want to open that VM to the internet, but we will ignore that for now.

can you tell me which one of the ips is the one I need for https://imgur.com/a/5vFBiXv

lo is always the loopback address. Really only used for a computer to reference itself. The next interface, enp0s3, only has one record under inet. That means that the ip address for this machine is You can ignore the /24 part. That’s CIDR Notation and essentially defines the network schema. This is probably a Dynamic IP so it will likely change when you reboot the VM.

Try going to in a browser on Windows. If that doesn’t work, we might have to open some firewall ports

it times out.

ok, can you verify the port in /etc/gitlab/gitlab.rb? If thats the right port then you will need to add a firewall rule. Try firewall-cmd --permanent --zone=public --add-port=8765/tcp. Another option would be to just disable the firewall entirely by running sudo systemctl stop firewalld; sudo systemctl disable firewalld;. I would like to point out though, disabling your firewall opens you up to the possibility of attacks, but it should be fine for a VM. And disabling the firewall entirely is essentially the sameas opening all the ports.

permission denied

su; cat /etc/gitlab/gitlab.rb | less

Honestly, you could just stay logged in as root to sidestep all that permission denied garbage

omm, should

give me something, like a text or something? For me I can input on the next line.

Yes. Basically, the su command will prompt you for roots credentials and log you in as root. The second command (bash commands and be shoved into one line and separated by ‘;’) displays the contents of /etc/gitlab/gitlab/rb in a meaningful way. cat just throws everything on the terminal and less lets you view it one page at a time. All of these commands have a manual so you can type man cat or man less or man man to get more information.

This should be one on the serverside btw

https://imgur.com/a/U9HpjpM but as you can see, I get no port or text

Thats really weird… but since you are already root, try running cat /etc/gitlab/gitlab.rb or view /etc/gitlab/gitlab.rb

gave me like a 5 page essay, which I couldn’t read because it went through all that in 3 seconds.

name: postgresql
Port: 5432

ok, try view /etc/gitlab/gitlab.rb. This will open vi in read-only mode. So the arrow keys will move you around and ‘:q!’ will exit

idk why less isnt working…

My teacher said that there should be a gnome version also on centos. vi=vim. It took us while to figure out how it works but still.

gnome is a graphical desktop while vi and vim (vim is VI iMproved) are just programs. You can install gnome and edit these files with gedit as well but that’s a whole other process

https://imgur.com/a/jSM0BY4 these ports are the once I found so far, update to see newer snippets

Unfortunately, this is where my help falls short. I can tell that all of those are comments (they start with a ‘#’) so none of those lines really matter. I don’t know enough about GitLab to tell you what settings to change.

Howerver, running netstat -lntu on the centos machine should list all of the open ports. Not just GitLab ports, but all of the ports. If there is too much output you can try netstat -lntu | less. Then you can brute force it and try all of those ports on the windows side… Not much fun, but technically guaranteed to work.