1
/etc/init.d/postgresql start

su postgres

psql -U postgres -c "drop database connectedcare"

I am running the above shell command in the jenkins execute shell command.

Got this error :

psql: FATAL: Peer authentication failed for user "postgres"

I then updated the /etc/postgresql/9.1/main/pg_hba.conf based on Stackoverflow question

However the command just keeps executing and never finishes.

How can I create a database in jenkins shell command ( postregresql )

1
  • Read the manual section on "client authentication", specifically about pg_hba.conf Commented Mar 11, 2016 at 10:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.