开启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
相关推荐
极小狐38 分钟前
从 GitLab Flow 到 Pipeline:分支策略 + CI/CD + 运维一文打通
ci/cd·gitlab·devops·极狐gitlab
猫头虎20 小时前
GitHub 入门教程:如何加入并为开源项目贡献代码
gitee·开源·gitlab·github·开放原子·开源协议·gitcode
悠然南风3 天前
【云原生学习】Prometheus监控、GitLab与Jenkins部署实战
kubernetes·gitlab
极小狐4 天前
极狐GitLab Runner 自托管安全加固指南
安全·ci/cd·gitlab·devops·runner·安全加固
钝挫力PROGRAMER5 天前
Windows Docker 环境搭建 GitLab CI/CD 流水线
windows·docker·gitlab·gitlab-runner
我一定会有钱11 天前
打造完美工作流:Git 配置”一次推送,三端同步”(Gitee/GitCode/GitHub)
开发语言·windows·vscode·搜索引擎·gitlab·github·visual studio code
LXY_BUAA11 天前
Git_在飞牛中部署 GitLab_20260817
git·gitlab
Jeanyia14 天前
GitLab 配套 Git 常用命令
git·gitlab
极小狐14 天前
极狐GitLab 补丁版本:19.2.1、19.1.3、19.0.5
网络·安全·gitlab·极狐gitlab·安全更新·补丁版本
rustfs15 天前
GitLab 如何与 RustFS 集成?
分布式·rust·gitlab