3

I've installed GitLab on Azure according to this: http://docs.gitlab.com/ce/install/azure/index.html

And now have a new VM running on mygit.northeurope.cloudapp.azure.com, with ports 22, 80 and 443 open. I can log in to my GitLab through the link above.

Locally I've set up the following:

git config --global user.name "Me My"
git config --global user.email "me.my@i.com"

As well as ssh stuff according to https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/

I've created a project (inside a group) in my GitLab repository, but then, whatever I try, cloning or pushing existing code, over SSH or HTTP, I get the following error messages:

ssh: Could not resolve hostname gitlab-ce.blablabla.cx.internal.cloudapp.net:MyGroup/MyProject.git: Name or service not known fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

And

fatal: unable to access 'http://gitlab-ce.blablabla.cx.internal.cloudapp.net:MyGroup/MyProject.git/': Could not resolve host: gitlab-ce.blablabla.cx.internal.cloudapp.net

What could I be missing? Any help would be appreciated!

Juri Pyykkö
  • 109
  • 2
  • 9
  • 1
    To clarify: Have you referred to the link :https://about.gitlab.com/2016/02/18/gitlab-dot-com-now-supports-an-alternate-git-plus-ssh-port/ You also need to configure your external URL for gitlab, see here: http://docs.gitlab.com/omnibus/settings/configuration.html – SumanthMarigowda-MSFT Dec 05 '17 at 16:25
  • If your GitLab server is misbehaving try running "sudo gitlab-ctl restart" before anything else., – CHEEKATLAPRADEEP Dec 05 '17 at 16:28
  • Will check both of these tomorrow when I'm back at work – Juri Pyykkö Dec 05 '17 at 20:05

1 Answers1

3

What could I be missing? Any help would be appreciated!

In Azure, Gitlab is pre-configured, so that external_url is a example, not an existing address, we should change it to your domain name.

We find the external_url here: /etc/gitlab/gitlab.rb Change it from http://gitlab-ce.hxakzvpf0otezeojz3wqhme5wg.cx.internal.cloudapp.net to your VM's domain name(we can find it via Azure portal), like this:

enter image description here

Then RUN sudo gitlab-ctl reconfigure for the change to take effect.

Now, we can refresh the browser to get new http address, like this:

enter image description here

Then we can use this new address to pull or clone.

Hope this helps.

Jason Ye
  • 13,710
  • 2
  • 16
  • 25