Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

direct access to to gitlab database

Tags:

gitlab

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

But I get:

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

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

like image 502
monteguy Avatar asked May 17 '15 00:05

monteguy


People also ask

Does GitLab have a database?

GitLab supports only PostgreSQL database management system. Thus you have two options for database servers to use with Omnibus GitLab: Use the packaged PostgreSQL server included with Omnibus GitLab (no configuration required, recommended).


2 Answers

sudo -u gitlab-psql /opt/gitlab/embedded/bin/psql -h /var/opt/gitlab/postgresql/ gitlabhq_production
like image 166
Daniel Alder Avatar answered Oct 17 '22 02:10

Daniel Alder


googled and found an issue about this.

so, just type sudo gitlab-rails dbconsole :D

like image 23
tdihp Avatar answered Oct 17 '22 00:10

tdihp