Getting "user: Current not implemented on linux/amd64" trying to connect over SSL
Tried to connect using the 'Schema' tab. Specified the ssl=true, sslcert and sslkey in the URI. Running Linux <name> 3.13.0-22-generic #44-Ubuntu SMP Wed Apr 2 20:05:40 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
To reproduce:
- Start process using
./pgweb_linux_amd64 - Point browser to http://localhost:8080 and select the 'Schema' tab.
- Enter url in the format
postgresql://user@devenv/appdb?ssl=true&sslcert=/path/to/postgresql.crt&sslkey=/path/to/postgresql.key
The error seems to be (after some quick Googling) to be related to a Go error: http://stackoverflow.com/questions/20609415/cross-compiling-user-current-not-implemented-on-linux-amd64
Please confirm if this is the case - I haven't tried to build from source though.
@insectatorious Issue confirmed.
I was planning on getting rid of os/user anyway, might as well do it now. The only reason why we need os/user is to figure out current user for localhost connections, for remote connection its most likely that user is something else than postgres.
@insectatorious Oh btw, i see that your url format is invalid: postgresql://. It should start with postgres://. Format checking is already fixed in master, but new release is not out yet. So if you specify a proper url prefix it should work as you have user defined. Used detection from os settings only happens when user is not provided.
@sosedoff Doh! You are correct sir. Fixed it and it's working like a charm! Thanks.
Closing this issue since it was fixed in "lib/pq" repo. pgweb will also try to fetch user from OS environment first.