We are using drush_make with our local subversion repository which requires authentication. In its current form drush_make requires that the password be exposed in cleartext somewhere in the process. To avoid that I propose the following patch. It checks the make file download array for the 'interactive' index, which can be set to any non-empty value, and removes the 'non-interactive' switch if TRUE. If set, the user will be prompted for any necessary credentials not supplied in the make file.

Example 1 - Adding the following to the make file will cause subversion to prompt for username and password:

projects[drupal][download][interactive] = 1

Example 2 - Adding the following to the make file will cause subversion to prompt for a password only:

projects[drupal][download][interactive] = 1
projects[drupal][download][username] = 'svnuser'

This patch also adds a space before the '--username' switch.

Thanks for the great module!

Comments

timwood’s picture

sub

yhahn’s picture

StatusFileSize
new3.83 KB

I've rerolled the patch after running into a couple of issues:

  • drush_shell_exec() was eating the initial output of the svn command when run interactively. The patch adds a fork of the function as a static method of the class, drush_shell_exec_interactive().
  • Specifying only the username was not working correctly as the command would be written --password ''.
  • Updated README.txt to reflect the additional option.

Needs review, testing, and most of all someone to say something about drush_shell_exec_interactive() and whether it really belongs.

dmitrig01’s picture

Filed an issue about drush_shell_exec_interactive: #901134: Add drush_shell_exec_interactive

jonhattan’s picture

interactive build breaks automation (think of aegir integration), shorten your keyboards life and kill kitties!

I dealt with this some months ago and I avoid exposing passwords by using svn+ssh:// and distributing ssh keys.

my 2¢

dmitrig01’s picture

Version: 6.x-2.0-beta8 » 6.x-2.x-dev
Status: Needs review » Needs work

needs major updating

dmitrig01’s picture

Status: Needs work » Fixed

done, thanks all

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.