qwat / QWAT

TEKSI Water module (project QWAT) - QGIS project
https://www.teksi.ch
GNU General Public License v2.0
58 stars 31 forks source link

psql: FATAL: password authentication failed for user "-v" #289

Closed tveinot closed 5 years ago

tveinot commented 6 years ago

I am trying to install QWAT using directions found https://media.readthedocs.org/pdf/qwat/latest/qwat.pdf but when I get to ./init_qwat.sh -p qwat -s 21781 -d -r the return is psql: FATAL: password authentication failed for user "-v" I added host all city-ad/tveinot 127.0.0.1/32 sspi include_realm=0 to my pg_hba.conf file in both the IPv4 and IPV6 lines but still get the authentication error. Does anyone know how to get around this? Using a windows 7. Thanks Tyler

tudorbarascu commented 6 years ago

I don't know if the init for the database is supported under windows. The error you get is either from the script that's malfunctioning under windows and didn't interpret the user right (it tries to connect to the database as a user named v and you probably wanted it with postgres or qwat. Another possibility is that you didn't created correctly the pg_service.conf file

tveinot commented 6 years ago

Since my conf file had other stuff in it from other projects I created a new one looking like this

[postgres]

dbname=postgres

user=postgres

[qwat]

enter your database ip

host=127.0.0.1

database name

dbname=qwat port=5432 user=postgres

you can also add your password if you like

password=admin Which is how the directions indicate it should be setup. My environment variables point to this file as well. Now the error is "-v" does not exist. I looked in the .sh script to see if I could just add my user name and pw but all I see is ${PGSERVICE} for a login role. I tried running git bash as admin too with no luck.

tudorbarascu commented 6 years ago

@tveinot From the link in my previous comment.. please read the "There are some caveats under Windows:" part as I suspect you neglected it. If you don't manage you could just restore one of the structures from https://github.com/qwat/qwat-data-model/releases. Please close this issue when you manage.

haubourg commented 5 years ago

Hi @tveinot, nice to see you here!

@tudorbarascu is right, the init script is designed for linux/BSD platforms. If you only want to test it on windows, you have all the dump files available for that.

Concernin the -v error message:

tudorbarascu commented 5 years ago

I think this can be closed, right?