direct access to to gitlab database

前端 未结 5 520
再見小時候
再見小時候 2021-01-31 06:45

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 rail

相关标签:
5条回答
  • 2021-01-31 06:52

    But this one does give you full access:

    sudo -u gitlab-psql psql template1
    
    0 讨论(0)
  • 2021-01-31 06:55
    sudo -u gitlab-psql /opt/gitlab/embedded/bin/psql -h /var/opt/gitlab/postgresql/ gitlabhq_production
    
    0 讨论(0)
  • 2021-01-31 06:56

    su - git
    /opt/gitlab/embedded/bin/psql -U gitlab -d gitlabhq_production -h /var/opt/gitlab/postgresql

    works for me with gitlab-ce and the embedded postgres. Optional for better interactive working start a bash as git. The (unix)-user git seems to be a peer to the postgresuser gitlab, authenticates without a password (/var/opt/gitlab/postgresql/data/pg_hba.conf).

    0 讨论(0)
  • 2021-01-31 06:58

    googled and found an issue about this.

    so, just type sudo gitlab-rails dbconsole :D

    0 讨论(0)
  • 2021-01-31 07:00
    sudo -u gitlab-psql /opt/gitlab/embedded/bin/psql -h /var/opt/gitlab/postgresql -d gitlabhq_production
    
    0 讨论(0)
提交回复
热议问题