Skip to content

FATAL: Peer authentication failed for user "gitlab"

version: gitlab-ce 15.1 my gitlab was restore from old gitlab instance’s backup, old gitlab instance also is gitlab-ce 15.1, restore command:

sudo gitlab-backup create GZIP_RSYNCABLE=yes SKIP=lfs,repositories
sudo gitlab-backup restore BACKUP=1656138991_2022_06_25_15.1.0 SKIP=lfs,repositories

error log:

==> /var/log/gitlab/postgresql/current <==
2022-06-26_05:18:22.49805 LOG:  no match in usermap "gitlab" for user "gitlab" authenticated as "root"
2022-06-26_05:18:22.51679 FATAL:  Peer authentication failed for user "gitlab"
2022-06-26_05:18:22.51680 DETAIL:  Connection matched pg_hba.conf line 70: "local   all         all                               peer map=gitlab"
2022-06-26_05:18:22.71587 LOG:  no match in usermap "gitlab" for user "gitlab" authenticated as "root"
2022-06-26_05:18:22.71589 FATAL:  Peer authentication failed for user "gitlab"
2022-06-26_05:18:22.71589 DETAIL:  Connection matched pg_hba.conf line 70: "local   all         all                               peer map=gitlab"
2022-06-26_05:18:22.75339 LOG:  no match in usermap "gitlab" for user "gitlab" authenticated as "root"
2022-06-26_05:18:22.75340 FATAL:  Peer authentication failed for user "gitlab"
2022-06-26_05:18:22.75340 DETAIL:  Connection matched pg_hba.conf line 70: "local   all         all                               peer map=gitlab"