What is a Gitlab Instance URL?

I’m not sure if I connected with gitlab successfully. In the docs it says:

Verify that your SSH key was added correctly.

  1. For GitLab.com, to ensure you’re connecting to the correct server, confirm the SSH host keys fingerprints.
  2. Open a terminal and run this command, replacing gitlab.example.com with your GitLab instance URL.

What is a Gitlab Instance URL? How do I get mine? I couldn’t find any answers on the web - really confused by this one.

A “Gitlab Instance URL” is a URL of a GitLab instance.

wow I bet your reddit friends will think this was hilarious
if someone else could help me out, that would be greatly appreciated :+1:

Well, for self hosted you would configure the instance URL yourself and you should know it. I guess that for instance hosted by gitlab you’d receive a weblink from them.
So it is just the webaddress of your gitlab, whether you configured it for a self hosted instance, or one you received from Gitlab to visit your instance.
grove’s reply might not seem very kind, but he/she is kinda correct that there isn’t much to explain about this.

To add some links which may clarify a bit more:

I had a feeling that was not what you wanted to know, but I’m not sure what you do want to know.

What are you actually trying to do? There are many pages of docs, which are you refering to?

thanks @bartj
well I received an invitation from my future boss, signed-up, set everything up and want to confirm if I can connect correctly.
in the docs it says that it shall look like this: git@gitlab.example.com
in your stackoverflow link it says it should look like this: gitlab.com
apparently I’m not getting something basic, but is there a way to get my instance URL for sure? like going to my dashboard, or settings and copying it from somewhere?

The url your boss sent you to invite you to connect to accept the invitation is what you use after the git@

since you signed up and logged in there, then you have the url.

aiit, will try that out, thanks @iwalker and @bartj

so I had to generate a new ssh key to make it work, but for all the others stumbling across the problem this thread was about:
1.Go to your dashboard
2.Copy the URL
3.Your Gitlab Instance URL is git@dashboardURL

If your future boss uses the SaaS offering on GitLab.com, the instance URL is gitlab.com, operated and managed by the GitLab infrastructure team.

If the company instead uses a self-managed setup, the domain where the webserver provides the GitLab UI cannot be gitlab.com or any sub domain. Instead, you often see something like

  • gitlab.companydomain.com
  • git.internaldomain.com

Or similar. From your browser’s address bar, you’ll extract https://gitlab.companydomain.com/ whereas the instance URL is gitlab.companydomain.com then.

Depending on the desired way to clone from the Git server in GitLab, you’ll either use SSH or HTTPS as transport. In your example, this is SSH using the git username @ the instance URL. Next to the URL, the clone command also needs the namespace and project with the .git suffix.

Tip: There’s also an easier way to get the clone URL from the UI in the web interface. Navigate into the project repository overview and click on the right side on Clone.


A click on the copy icon copies the text into your clip board, and depending on your OS, you can insert it into the terminal then. On macOS, use cmd+v.


1 Like


On the “Clone with SSH” box, I have a question? Breaking down the url in there:
git " I know this is the user"
gitlab.com → This comes from hostname on a deployment config? Is there any other way configure this?


I’ve taken the screenshot from a project on GitLab.com SaaS, hence the gitlab.com URL. If you are running a self-managed instance, this will be the instance URL configured as external_url in your gitlab.rb settings. More in the documentation.


Thanks Michael. I had run across that and could have sworn I had it set. It might have been an issue with the envvar that was being used. So I set it directly in the gitlab.rb file.

This seemed to cause a few other issues (too many redirects so I will play with the reverse proxy…).

However, looking at the logs this seems like it worked.

Thanks so much.


In my case the Gitlab instance url was simply git@gitlab.com