开启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
相关推荐
这个需求做不了19 小时前
Jenkins自动化构建与CI/CD流水线,并配置GitLab
java·ci/cd·自动化·gitlab·jenkins
qq_452396231 天前
第六篇:《GitLab CI 进阶:多环境部署与环境变量管理》
git·ci/cd·gitlab
考虑考虑3 天前
git中的tag
git·gitlab·github
Skilce5 天前
基于GitLab CI/CD + Kubernetes的自动化部署平台搭建
ci/cd·kubernetes·gitlab
行者-全栈开发5 天前
Jenkins 与 GitLab 深度集成实战:从 Webhook 到 Merge Request 全流程自动化
gitlab·jenkins·webhook·merge request·multibranch·source plugin·ci/cd 自动化
zoipuus7 天前
上传repo仓库到自己的gitlab
linux·gitlab·shell·全志·tina
刘马想放假7 天前
Git 从入门到进阶:一篇吃透版本管理的实战指南
git·gitlab
NexTunnel11 天前
公司老项目还在 SVN,远程维护怎么做更稳?
git·svn·gitlab·远程工作·nextunnel
想你依然心痛13 天前
持续集成在嵌入式开发中的实践:GitLab CI与交叉编译——自动化构建、固件生成
ci/cd·自动化·gitlab
Sean‘13 天前
GitLab 升级后 502:Puma 反复重启问题处理记录
docker·gateway·gitlab