Peer authentication failed for user postgres

Edit on GitHub

Description

When running ./setup, on the Setup Zed step, the following error occurs:

Zed Exception: RuntimeException - psql: FATAL:  Peer authentication failed for user "postgres"

Solution

Open the PostgreSQL configuration file :

sudo vim /etc/postgresql/9.4/main/pg_hba.conf

and make sure that the first line contains the following input:

TYPE      DATABASE    USER      ADDRESS     METHOD
local     all         postgres              trust