开启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
相关推荐
IT布道2 小时前
[GitLab] 项目源码迁移踩坑记
运维·gitlab
极小狐1 天前
PingCode × 极狐GitLab 用AI打通需求到交付全链路,研发管理与工程交付真正一体化
人工智能·gitlab·pingcode
qq_452396232 天前
【工程实战】第九篇:持续集成 —— Jenkins 与 GitLab CI:构建无人值守的自动化流水线
ci/cd·gitlab·jenkins
angushine5 天前
gitlab跨服务器备份
服务器·gitlab·github
蜡台6 天前
Git 常用配置:修改地址 ,提交模板配置
git·gitlab·template·git commit·gitbash
染夕陌木6 天前
极简教程:GitLab 上配置 SSH Key(附常见问题解决)
运维·ssh·gitlab
晨旭缘7 天前
GitLab CICD 中 K8s 部署:BOM 头与 YAML 格式全解
容器·kubernetes·gitlab
鳄鱼杆8 天前
服务器 | 2026年Ubuntu 24.04下GitLab Docker 企业级部署
服务器·ubuntu·gitlab
FreeBuf_9 天前
黑客滥用 GitHub 和 GitLab 托管恶意软件并实施凭证钓鱼攻击
gitlab·github
有理想的打工人12 天前
gitlab的参数设置与团队管理
gitlab