开启gitlab中远程连接pgsql

1、修改gitlab.rb

vim /etc/gitlab/gitlab.rb

配置为:

postgresql['enable'] = true

postgresql['listen_address'] = '0.0.0.0'

postgresql['port'] = 5432

postgresql['data_dir'] = "/var/opt/gitlab/postgresql/data"

2、gitlab-ctl reconfigure 等待报错

3、修改pg_hba.conf

vim /var/opt/gitlab/postgresql/data/pg_hba.conf

注释Local行、增加下面行

host all all 0.0.0.0/0 trust

4、gitlab-ctl restart

5、连接gitlabhq_production、用户名gitlab

附:本地连接命令

复制代码
sudo gitlab-rake gitlab:env:info

-sh-4.2$ psql -h /var/opt/gitlab/postgresql -d gitlabhq_production
相关推荐
切糕师学AI7 小时前
GitLab 是什么?
gitlab
明月心9522 天前
git remote add 用法
gitlab
only_Klein2 天前
jenkins流水线报错:Connection reset by peer
ci/cd·kubernetes·gitlab·jenkins·ssl
梁萌3 天前
docker部署gitlab和gitlab runner
docker·eureka·gitlab
johnnyAndCode3 天前
Idea 设置GitLab时使用账密,而不是token的配置方法
gitlab·idea
天外飞雨3 天前
Gitlab使用
gitlab
BUTCHER54 天前
GitLab SSH 密钥配置
运维·ssh·gitlab
明月心9524 天前
GitLab使用
gitlab
明月心9525 天前
gitlab pull requets
gitlab
BUTCHER55 天前
GitLab基本设置
gitlab