Invidious: psql: FATAL: Peer authentication failed for user "kemal"

Created on 6 Nov 2019  路  5Comments  路  Source: iv-org/invidious

Hi,
while trying to install, I face this problem:
psql invidious kemal < /home/invidious/invidious/config/sql/videos.sql
psql: FATAL: Peer authentication failed for user "kemal"

what's wrong?

question

Most helpful comment

your postgresql is configured for peer authentication by default,
you probably need to change the line in pg_hba.conf :

# "local" is for Unix domain socket connections only
local   all             all                                     peer

to

# "local" is for Unix domain socket connections only
local   all             all                                     trust

Alternatively you can use "md5" instead of "trust" and should be asked for a password.

All 5 comments

Would you mind providing the commands you ran up to this point?

Exactly the same issue. Following the installation instructions exactly yields the error.

your postgresql is configured for peer authentication by default,
you probably need to change the line in pg_hba.conf :

# "local" is for Unix domain socket connections only
local   all             all                                     peer

to

# "local" is for Unix domain socket connections only
local   all             all                                     trust

Alternatively you can use "md5" instead of "trust" and should be asked for a password.

@mavu's solution worked for me on a Debian 9 install.

I found pg_hba.conf file at the following path /etc/postgresql/9.6/main/pg_hba.conf thanks to this trick:

To check location of pg_hba.conf connect to postgres db using psql then type SHOW hba_file; command.

You can solve this issue by adding -h 127.0.0.1, then you are asked for the password of kemal:

psql invidious kemal -h 127.0.0.1 < /home/invidious/invidious/config/sql/playlist_videos.sql
Was this page helpful?
0 / 5 - 0 ratings

Related issues

PureTryOut picture PureTryOut  路  3Comments

EstherMoellman picture EstherMoellman  路  4Comments

Jtasiu picture Jtasiu  路  3Comments

kozross picture kozross  路  3Comments

dimqua picture dimqua  路  4Comments