When migrating my self-managed omnibus instance from 18.2.4 to 18.3.0 I got the following error:
gitlab | STDOUT: Running migrate up
gitlab | Executing command:
gitlab | /opt/gitlab/embedded/bin/registry database migrate up /var/opt/gitlab/registry/config.yml
gitlab | time="2025-08-22T08:20:51Z" level=error msg=Connect database=registry_database duration_ms=5 err="failed to connect to `user=registry database=registry_database`: /var/opt/gitlab/postgresql/.s.PGSQL.5432 (/var/opt/gitlab/postgresql/): failed SASL auth: FATAL: password authentication failed for user \"registry\" (SQLSTATE 28P01)" host=/var/opt/gitlab/postgresql/ port=5432
gitlab | failed to construct database connection: verification failed: failed to connect to `user=registry database=registry_database`: /var/opt/gitlab/postgresql/.s.PGSQL.5432 (/var/opt/gitlab/postgresql/): failed SASL auth: FATAL: password authentication failed for user "registry" (SQLSTATE 28P01)
gitlab | STDERR:
I tried to remove and restart the container but I consistently get the same error. I’d need some guidance about how to fix this, thanks in advance for any help.
had the same problem. Since /var/opt/gitlab/postgresql/data/pg_hba.conf gets auto-generated by some process you have to change its content during update. The problem is the line:
# registry_db
local registry registry md5
it has to be replaced during update with
# registry_db
local registry registry trust
to fix the problem for now i opened a second session copying the fixed file with
Hi @kossmac, your solution worked beautifully, thank you very much! I don’t know if it is a proper fix, i.e. if local registry registry actually has to be set to trust, or just a workaround, but it doesn’t matter. What really matters is how such a thing can pass the pre-release tests unnoticed.
I have been able to resolve the issue in a persistent way, leveraging the fact that in my Omnibus deployment I use a bind mount for the /etc/gitlab container folder: fixing gitlab.rbin there as suggested by kheresy persists over container reboot/recreation, so I’m done.
Thanks for reporting. For future problems that involve the Omnibus packages and sound like a bug, please create bug report issues directly for the engineering teams.