After installing GitLab Omnibus edition I wanted to take a look at the database tables.
To do so I installed phpPgAdmin (available in the EPEL repo):
yum install phpPgAdmin
I created a user in Postgres for use with phpPgAdmin:
su - gitlab-psql /opt/gitlab/embedded/bin/psql gitlabhq_production gitlabhq_production=# CREATE USER jonny_test WITH PASSWORD 'opensesame'; CREATE ROLE gitlabhq_production=# GRANT ALL PRIVILEGES ON DATABASE gitlabhq_production to jonny_test; GRANT gitlabhq_production=# GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO jonny_test; GRANT gitlabhq_production=# \q
If you have problems running the psql command you may want to specify the the unix socket directory as follows:
/opt/gitlab/embedded/bin/psql -h /var/opt/gitlab/postgresql/ gitlabhq_production
I then checked the phpPgAdmin config file settings:
/usr/share/phpPgAdmin/conf/config.inc.php
$conf['servers'][0]['host'] = 'localhost'; $conf['extra_login_security'] =false;
and protected the phpPgAdmin install by editing the Allow, Deny rules in /etc/httpd/conf.d/phpPgAdmin.conf
After all of that I was able to browse the GitLab database.
I made a script in /root/bin/gitlab-psql.sh:
su -l gitlab-psql -c ‘/opt/gitlab/embedded/bin/psql gitlabhq_production’
What’s the password for gitlab-psql user? Or how do you find it ?
It doesn’t have any password in my case…
Does anyone know how to find the password for gitlab-psql?