gitlab命令集合

2023年 3月 18日 12点热度 0人点赞

修改gitlab访问地址 

vi  /etc/gitlab/gitlab.rb修改如下

external_url 'http://59.110.159.79:8085/gitlab'      //需要添加ip+端口或者(域名+端口+访问前缀)

修改了配置一定要重置配置!!!

给gitlab配置相对路径

Configure a relative URL for GitLab

For self-compiled (source) installations, there is a separate document.
While we recommended installing GitLab in its own (sub)domain, sometimes it is not possible. In that case, GitLab can also be installed under a relative URL, for example, https://example.com/gitlab.

By changing the URL, all remote URLs change as well, so you must manually edit them in any local repository that points to your GitLab instance.

To enable relative URL in GitLab:

  1. Set the external_url in /etc/gitlab/gitlab.rb:In this example, the relative URL under which GitLab is served is /gitlab. Change it to your liking.
  2. Reconfigure GitLab:
external_url "https://example.com/gitlab"
sudo gitlab-ctl reconfigure

If you have any issues, see the troubleshooting section.

重置配置

sudo gitlab-ctl reconfigure

重启gitlab服务

sudo gitlab-ctl restart

rainbow

这个人很懒,什么都没留下

文章评论