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?
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).
sudo -u gitlab-psql /opt/gitlab/embedded/bin/psql -h /var/opt/gitlab/postgresql/ gitlabhq_production
googled and found an issue about this.
so, just type sudo gitlab-rails dbconsole
:D
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With