Do not forget to clear the cache after updating the external_url
param in /etc/gitlab/gitlab.rb
, otherwise your existing project clone URLs will still be showing your old host name.
A simple 3 step process to change the hostname is as follows
external_url
param in /etc/gitlab/gitlab.rb
sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart
sudo gitlab-rake cache:clear
Ref: