1. gitlab域名修改
1.1 修改gitlab配置文件中host
vi /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml
gitlab:¬
## Web server settings (note: host is the FQDN, do not include http://)¬
host: xxxxxxx.cn// 原域名
port: 81
gitlab:¬
## Web server settings (note: host is the FQDN, do not include http://)¬
host: xxxxxxx.cn// 原域名
port: 81
1.2 修改nginx中gitlab配置文件
vi ~git/nginx/conf/gitlab-http.conf
server {
listen *:81;
server_name xxxxxxx.cn;
...
}
server {
listen *:81;
server_name xxxxxxx.cn;
...
}
1.3 重启nginx和gitlab
sudo gitlab-ctl restart
1.4 修改项目中gitlab-runner地址
vi /etc/gitlab-runner/config.toml
gitlab-runner restart
2. 修改密码
sudo gitlab-rails console production
-------------------------------------------------------------------------------------
GitLab: 11.1.4 (63daf37)
GitLab Shell: 7.1.4
postgresql: 9.6.8
-------------------------------------------------------------------------------------
Loading production environment (Rails 4.2.10)
irb(main):001:0> u=User.where(id:1).first
=> #<User id:1 @root>
irb(main):002:0> u.password='123456'
=> "123456"
irb(main):003:0> u.password_confirmation='123456'
=> "123456"
irb(main):004:0> u.save!
Enqueued ActionMailer::DeliveryJob (Job ID: 7bffac81-aab5-4d3a-b771-bdffb4145020) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", gid://gitlab/User/1
=> true
irb(main):005:0> exit
sudo gitlab-rails console production
-------------------------------------------------------------------------------------
GitLab: 11.1.4 (63daf37)
GitLab Shell: 7.1.4
postgresql: 9.6.8
-------------------------------------------------------------------------------------
Loading production environment (Rails 4.2.10)
irb(main):001:0> u=User.where(id:1).first
=> #<User id:1 @root>
irb(main):002:0> u.password='123456'
=> "123456"
irb(main):003:0> u.password_confirmation='123456'
=> "123456"
irb(main):004:0> u.save!
Enqueued ActionMailer::DeliveryJob (Job ID: 7bffac81-aab5-4d3a-b771-bdffb4145020) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", gid://gitlab/User/1
=> true
irb(main):005:0> exit