sosedoff / pgweb

Cross-platform client for PostgreSQL databases
https://sosedoff.github.io/pgweb
MIT License
8.63k stars 732 forks source link

Could not detect default username #407

Closed alvlapo closed 5 years ago

alvlapo commented 5 years ago

Getting this error when run docker container.

$ docker pull sosedoff/pgweb $ docker run -p 8081:8081 sosedoff/pgweb

pq: Could not detect default username. Please provide one explicitly

docker -v Docker version 18.09.1, build 4c52b90

$ cat /etc/*-release Fedora release 29 (Twenty Nine) NAME=Fedora VERSION="29 (Twenty Nine)" ID=fedora

$ uname -a Linux aspire5315.lostroom 4.19.10-300.fc29.x86_64 #1 SMP Mon Dec 17 15:34:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

sosedoff commented 5 years ago

Found the issue. Basically, the pgweb docker image does not have USER env var and libpq library fails to detect the current user, which we use as a default like psql does. Will fix.

sosedoff commented 5 years ago

The issue with docker image has been fixed in pgweb v0.11.1.