GitLab8.9修改项目地址

本文中:

系统/软件 版本
Centos 6.5
GitLab 8.9


在使用GitLab的过程中会遇到GitLab服务器IP变更的问题,比如我用镜像克隆一个新的系统出来,然后运行这个镜像,这时候GitLab能够正常的运行;但是会遇到一个问题,就是git中项目地址还是原来的服务器的IP,运行git clone命令时会出现错误:

Connection refused
fatal: Could not read from remote repository.

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

这是因为我们采用镜像启动服务器后,服务器的IP地址发生了改变,但gitlab设置的ip并没有改变,还是指向原来的服务器ip,这时只需要将gitlab的服务器ip改成现在服务器的ip地址即可。

修改如下文件:


#/var/opt/gitlab/gitlab-rails/etc/gitlab.yml

 ## GitLab settings
 gitlab:
   ## Web server settings (note: host is the FQDN, do not include http://)
   host: 这个地方填gitlab所在服务器的ip即可
   port: 80
   https: false

你可能感兴趣的:(GitLab)