作為這篇文章的補充:
將gitlab中的postgresql數據庫開通遠程訪問
https://www.cnblogs.com/andy9468/p/10609682.html
替代(二)中的2、3、4步驟。
繼續修改gitlab.rb
vim /etc/gitlab/gitlab.rb
postgresql['custom_pg_hba_entries'] = { APPLICATION:[ { # APPLICATION should identify what the settings are used for type: "host", database: "all", user: "all", cidr: "0.0.0.0/0", method: "trust" # option: exmple } ] }
效果如圖:
配置生效:
gitlab-ctl reconfigure
隨便查看一下pg_hba.conf文件的變化(不用修改)
vim /var/opt/gitlab/postgresql/data/pg_hba.conf
也就是說以后就不需要修改
/var/opt/gitlab/postgresql/data/pg_hba.conf文件了。
同時也可以使用gitlab-ctl reconfigure命令了。