开启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
相关推荐
一念一花一世界8 小时前
Arbess从基础到实践(25) - 集成GitLab+阿里云OSS实现Java项目自动化构建并将制品上传Aliyun OSS
java·阿里云·gitlab·cicd·arbess
一念一花一世界1 天前
Arbess从基础到实践(23) - 集成GitLab+Hadess实现Java项目构建并上传制品
java·gitlab·cicd·arbess·制品库
HIT_Weston2 天前
63、【Ubuntu】【Gitlab】拉出内网 Web 服务:Gitlab 配置审视(七)
前端·ubuntu·gitlab
HIT_Weston2 天前
65、【Ubuntu】【Gitlab】拉出内网 Web 服务:Gitlab 配置审视(九)
前端·ubuntu·gitlab
victory04312 天前
GitLab部署报告
gitlab
HIT_Weston2 天前
64、【Ubuntu】【Gitlab】拉出内网 Web 服务:Gitlab 配置审视(八)
前端·ubuntu·gitlab
HIT_Weston2 天前
62、【Ubuntu】【Gitlab】拉出内网 Web 服务:Gitlab 配置审视(六)
前端·ubuntu·gitlab
不爱吃米饭_3 天前
Gitea 轻量级的Git方案 - Gitlab的替代品
git·gitlab·gitea
嘻哈baby3 天前
自建GitLab与CI/CD实战:团队协作完整方案
ci/cd·gitlab
秦时明月天明3 天前
GitLab SSH Key 过期:git pull failed : remote your ssh key has expired
git·ssh·gitlab