Last active
October 2, 2018 09:50
-
-
Save blacktrub/5b11989d7e4db5486d276b3f87b9164f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # create .pgpass in your home directory with same content | |
| localhost:5432:your_db_name:your_db_username:password | |
| # set required permissions for this file | |
| sudo chmod 600 .pgpass | |
| # set PGPASSFILE variable in your .bashrc or in .zshrc | |
| export PGPASSFILE='/home/your_user/.pgpass' | |
| # test your .pgpass | |
| psql -h host -U your_db_username -d your_db_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment