PROBLEM:
When I create a repository in GitLab, it shows different HTTP URL and SSH URL of the repository by some reason.
eg)
HTTP: http://anotherexample.com/myrepo.git
SSH: [email protected]/myrepo.git
My gitlab URL is: https: //gitlab.example.com, so SSH is correct and HTTP is wrong.
( anotherexample.com is the URL of my server before I set DNS.)
I looked at /var/opt/gitlab/gitlab-rails/etc/gitlab.yml, then found:
# 1. GitLab app settings
# ==========================
host: anotherexample.com
port: 80
https: false
ssh_host: gitlab.example.com
then I manually changed this host and it's temporarily solved.
However, gitlab.yml will be updated when I do gitlab-ctl reconfigure.
QUESTION:
How can I set this host name for HTTP in /etc/gitlab/gitlab.rb
?
I've already had two lines below:
external_url 'https://gitlab.example.com'
gitlab_rails['gitlab_ssh_host'] = 'gitlab.example.com'
but it seems not work for HTTP url.
My GitLab version : 8.8.3
My server : CentOS 6.8 + nginx 1.10.1
Thanks in advance.
For people like me who had entirely the wrong URL you will need to update just
external_url "http://gitlab.example.com"
in /etc/gitlab/gitlab.rb
and then run
sudo gitlab-ctl reconfigure
for the changes to take effect. You can read more in the official docs here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With