How can I make my GitLab repository (which I built in Docker and is currently only visible to me using an IP-based URL) accessible to others and prevent the "Site can't be reached" error?

I am fairly new to GitLab and had been asked to create a container for GitLab in Docker. The issue is that, even though my local directory that I pushed to GitLab is available to me, when I share it to others, they see are unable to view it. Please mind that, the URL of the repository is like
http://192.**:1234/root/MyGitLabRepo.

I have ensured that my Docker & GitLab container is running properly on my system (Proof). Could the port that I have chosen (1234) be one of the reasons for why I can’t share my repository? I had to change the port because port 80 was already in use.

In the ‘Proof’ linked above, my repository can also be seen working without any issue as when I use Git to push my local files to the GitLab repository, they get pushed without any problem. Please provide with a solution for how I can share my repository and if there is any detail that I missed, kindly let me know.

To fix this issue, I tried making sure my Docker & GitLab container were working fine. Though the repository is opening in my browser without any issue, when I try to open it on a different system, I get shown “this site took too long to load”. I was expecting the repository that I had pushed to GitLab to open up when the shared URL was clicked.

Hey there,

Just to break down some basics.
You have installed self-hosted Gitlab instance… where? On a server with IP 192…? → This looks to me like a installation in local network which means anyone outside your network (or where is this installed) cannot reach it. So, two questions:

  • Who is “others”? People from outside your network or inside your network?
  • Do you really intended to use self-hosted instance? If it’s only for your own usage, you can also use gitlab.com (in cloud), without having your own one.

Thanks for the response!

You are right about having GitLab installed on my local. Others are the people outside of my network that i would like to share my GitLab repository with but can’t due to it being on a local network.

I did intend to install GitLab in a container using docker but I was not expecting not being able to share the repository.

If there is anyway I can make this repository in my container available for others, please let me know.

I believe there are ways, but it’s completely out of scope of GitLab and this forum and goes more into general system administration / networking topic. Your instance needs a public static IP address. Normally you would not install this on a local computer, but a server.

Again comes the question - why do you want a self-hosted GitLab instance?

I’m really not sure what is your intention with this and use case, but if you just need a repo that others can access, I highly recommend you using gitlab.com → it’s free (with some limitations) and you don’t need to have your own GitLab installation to manage. You just need to create a free account and then you can make your project and others will have no problem accessing it (if it’s public, if it’s private - then your collegues also need a GitLab account, and you will add them to the project).

Unless you’re a company with valid reasons to have a self hosted instance, I wouldn’t recommend to have it, as it just adds more work. But if you really want to have your own, just for fun anyways, then I’d recommend you to buy a VM somewhere in cloud and install it there (in order for others to see it).