编辑:vim /etc/gitlab/gitlab.rb

external_url "https://gitlab.example.com"
nginx['redirect_http_to_https'] = true

刷新:
gitlab-ctl reconfigure