bundler/bundler — pull request #2582 by Plaristote (2013-08-06 12:17:17+00:00)
Title: SSH_ASKPASS support for git repositories with SSH authentication

Greetings,
Currently, when a Gemfile contains references to git repositories that can only be accessed through ssh authentication, there's no way to tell bundler to input a password instead of us. Consequently, it is impossible to automatically bundle an application without an user supervising the operation.

I have tried to overcome this issue by implementing some SSH_ASKPASS support directly into bundler.
In this branch of bundler, the users may set a 'password' option to their gem entry. In which case, when trying to clone/update the repository, git will generate the script that SSH will ask for to get the password.

The process to implement SSH_ASKPASS was largely inspired by this article:
http://andre.frimberger.de/index.php/linux/reading-ssh-password-from-stdin-the-openssh-5-6p1-compatible-way/
Though I'm using an environment variable rather than stdin to send the password.

Currently, if the user is running Windows, the password option will be ignored.
I believe Windows support might be possible with very few alterations, but I do not have any material to test it.

So, if any souls are interested, is there any way I can make this more acceptable for general use ?