直接访问gitlab数据库 [英] direct access to to gitlab database

查看:100
本文介绍了直接访问gitlab数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从gitlab运行AWS AMI.我正在尝试使用psql直接访问postgres数据库.我以为我可以只使用database.yml中的凭据,因为Rails应用程序运行良好:

I am running the AWS AMI from gitlab. I am trying to access the postgres database directly using psql. I thought I could just use the credentials in database.yml, since the rails application is working fine:

/opt/gitlab/embedded/bin/psql -U gitlab -d gitlabhq_production

但是我得到了

psql: FATAL:  Peer authentication failed for user "gitlab"

Rails应用程序如何在psql无法连接的情况下连接到数据库?

How can the rails app be connecting to the database while psql cannot?

推荐答案

sudo -u gitlab-psql /opt/gitlab/embedded/bin/psql -h /var/opt/gitlab/postgresql/ gitlabhq_production

这篇关于直接访问gitlab数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆