Can I use .pgpass authentication from command-line?
See original GitHub issueSystem information:
- Operating system (distribution) and version: MacOS 10.15.6
- DBeaver version: 7.1.3.202007192031
Connection specification:
- Database name and version: PostgresSQL 12.3
Describe your question:
I want to use DBeaver from the command-line, passing in all connection info as well as the username. However I don’t want to have the password on the CLI arguments list. I see DBeaver supports pgpass
, but it doesn’t seem to be looking there for my CLI connection. I don’t see any mention of pgpass.
If I don’t specify the password, I get:
The server requested password-based authentication, but no password was provided.
I see the data-sources.json describes it as "auth-model": "postgres_pgpass"
, I tried passing in various versions of these strings but no dice. Is pgpass supported for CLI usage or am I missing something obvious?
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Navigating Postgresql - Command Line Login / Using .pgpass
You can login to the database directly from a linux shell using psql. Typically, one would list the parameters used to connect directly...
Read more >Postgresql: Scripting psql execution with password
Create the file using vim ~/.pgpass or similar. Input your information in the following format: hostname:port:database:username:password Do not add string ...
Read more >How to use psql with no password prompt?
You have four choices regarding the password prompt: set the PGPASSWORD environment variable. For details see the manual:
Read more >Documentation: 15: 34.16. The Password File - PostgreSQL
The file .pgpass in a user's home directory can contain passwords to be used if the connection requires a password (and no password...
Read more >pgpass file does not set default username to connect as
psql defaults to using your current unix username when connecting, unless you specify something different. If you want a different default ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
PgPAss (and other non-default auth models) support was added. See https://github.com/dbeaver/dbeaver/wiki/Command-Line#connection-parameters and https://github.com/dbeaver/dbeaver/wiki/Database-authentication-models
oh whew. That’s great!