This rsync hung because of an SSH unknown key prompt. Since this is just
the vm host sshing to the vm guest, it is not essential to check the host
keys.
# Helper to copy the contents of a directory to the server...
def send_dir(path):
logging.debug("rsyncing " + path + " to " + ftp.getcwd())
# Helper to copy the contents of a directory to the server...
def send_dir(path):
logging.debug("rsyncing " + path + " to " + ftp.getcwd())
+ # TODO this should move to `vagrant rsync` from >= v1.5
try:
subprocess.check_output(['rsync', '--recursive', '--perms', '--links', '--quiet', '--rsh=' +
'ssh -o StrictHostKeyChecking=no' +
try:
subprocess.check_output(['rsync', '--recursive', '--perms', '--links', '--quiet', '--rsh=' +
'ssh -o StrictHostKeyChecking=no' +
for d in ('.m2', '.gradle/caches', '.gradle/wrapper', '.pip_download_cache'):
fullpath = os.path.join(os.getenv('HOME'), d)
if os.path.isdir(fullpath):
for d in ('.m2', '.gradle/caches', '.gradle/wrapper', '.pip_download_cache'):
fullpath = os.path.join(os.getenv('HOME'), d)
if os.path.isdir(fullpath):
- # TODO newer versions of vagrant provide `vagrant rsync`
+ ssh_command = ' '.join('ssh -i {0} -p {1}'.format(key, port),
+ '-o StrictHostKeyChecking=no',
+ '-o UserKnownHostsFile=/dev/null',
+ '-o LogLevel=FATAL',
+ '-o IdentitiesOnly=yes',
+ '-o PasswordAuthentication=no')
+ # TODO vagrant 1.5+ provides `vagrant rsync`
run_via_vagrant_ssh(v, ['cd ~ && test -d', d, '|| mkdir -p', d])
subprocess.call(['rsync', '-axv', '--progress', '--delete', '-e',
run_via_vagrant_ssh(v, ['cd ~ && test -d', d, '|| mkdir -p', d])
subprocess.call(['rsync', '-axv', '--progress', '--delete', '-e',
- 'ssh -i {0} -p {1} -oIdentitiesOnly=yes'.format(key, port),
fullpath + '/',
user + '@' + hostname + ':~/' + d + '/'])
fullpath + '/',
user + '@' + hostname + ':~/' + d + '/'])