-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drush keeps on asking the password on PostgreSQL site-install #693
Comments
Tried a proposed solution from https://drupal.org/node/2146131 On the latest version on drush i changed, but it still doesn't work:
|
I would be happy to know if there is a way to test postgresql without install, also. Since that is possible with mysql. |
ping @greg-1-anderson |
Hm, seems I have used D7 site install on postgres before, but if it is not working for you, I guess it must have broken. Will add it to my large backlog of things to look at, but I've got a lot of balls in the air right now. Will see what I can do -- I like postgres testing on Drupal. :) |
Sorry, I didn't read the whole description, and missed what your problem was! Sorry. The thing about postgres and Drush is that there isn't any way to get the psql client to suppress the password prompt via commandline parameters. You have to write a .pgpass file in your home directory. Mine looks like this:
I don't think that there is a way to tell psql to use a different .pgpass file, but we could potentially fake that by setting the HOME environment variable to some directory that contained one, just for each invocation of psql. If writing a .pgpass file is not an option for the testbot, let me know, and I will investigate making Drush write one using that technique. |
I created a PR #695 that should do the trick, at least for site-install. |
Fixed by the above-mentioned PR. |
There's likely a much easier way. All you need to do is set the environment variable PGPASSWORD The same thing can probably be done in your other drush commands. If no flags are passed in then you will for sure be prompted for a password |
Users may continue to use .pgpass or the PGPASSWORD environment variable if they wish; this is, in fact, easier for users to set up. However, if Drush is going to supply the password to a postgres database using the password that is configured in the settings.php file, using PGPASSWORD would expose the password on the process list. This is no worse than what Drush does for mysql, where the password appears in the commandline arguments, and is therefore exposed in the process list. However, since we have the capability to put the password in a file, and specify a path to the file in an environment variable, doing it that way is more secure. I suppose that Drush could do a |
ping @weitzman, since this is quite important to make the postgresql testbot on D7 to work.
The text was updated successfully, but these errors were encountered: