开启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
相关推荐
霸道流氓气质10 天前
GitLab CI/CD 完全指南
linux·ci/cd·gitlab
sbjdhjd10 天前
从零搭建企业级 CI/CD(下):Jenkins+GitLab+Harbor 全链路实战指南
git·servlet·ci/cd·云原生·云计算·gitlab·jenkins
用什么都重名11 天前
Git 合并两个无共同历史的分支:从报错到解决全记录
git·gitlab
master33611 天前
GitLab (Docker) 常用命令及解决方案清单
docker·容器·gitlab
qq_3564086611 天前
GitLab 单机私有化部署文档(基于 Docker 环境)
docker·gitlab
lisanmengmeng13 天前
gitlab 免密配置
linux·服务器·gitlab
求知若渴,虚心若愚。13 天前
Jenkins 自动化流水线(CICD)
运维·自动化·gitlab
mnasd15 天前
Gitlab + Jenkins 实现 CICD
运维·gitlab·jenkins
鹤鸣的日常15 天前
前端运行时动态环境变量方案
前端·react.js·docker·前端框架·vue·gitlab
starvapour15 天前
Ubuntu部署gitlab频繁出现502的问题
linux·ubuntu·gitlab