beaker
beaker copied to clipboard
Rsync may not be able to use a provided password for the SSH connection
The code for this is a little hairy but, based on testing voxpupuli/beaker-docker, I don't think that rsync
is able to use the password provided for SSH connections.
The evidence of this is when I was attempting to run the main acceptance tests in beaker-docker which hook back into this repository. The connection would hang for rsync and prompt for the root password.
The code in question is in the do_rsync_to method in host.rb. I don't see any obvious method by which the connection is told to use the provided username/password authentication. The comments allude to Vagrant which makes me think that it was not tested in Docker.
It does seem to allow setting some options for the ssh config I wonder if beaker-docker needs to set those somehow.
I've worked around this by copying a ssh key over but it would be good if this could be done automatically and use a local generated key.
host.scp_to("#{ENV['HOME']}/.ssh/id_rsa.pub", "/root/.ssh/authorized_keys") host.install_package('rsync')