Open djdevin opened 10 years ago
same one here - looks like ssh_info[:private_key_file] is an array instead of a string...
Also getting this. Getting an array instead of a string.
I believe this is fixed in master but the gem hasn't been updated since version.. 4? It's at 9 now - just copy the files from github over the plugin in your vagrant install and it should work fine.
No it is not fixed. I copied clone and still same issue.
I had the same problem in version 9 that the private_key string was in an array.
A quick dirty fix which worked for me was to edit the command.rb file:
Add after the line:
ssh_info = machine.ssh_info
this line:
keypath = ssh_info[:private_key_path].first
Then change the line
"-sshargs", "-p #{ssh_info[:port]} -o StrictHostKeyChecking=no -i #{ssh_info[:private_key_path]}",
to
"-sshargs", "-p #{ssh_info[:port]} -o StrictHostKeyChecking=no -i #{keypath}",
So the result is:
ssh_info = machine.ssh_info
keypath = ssh_info[:private_key_path].first
# Create the guest path
machine.communicate.sudo("mkdir -p '#{guestpath}'")
machine.communicate.sudo("chown #{ssh_info[:username]} '#{guestpath}'")
# Unison over to the guest path using the SSH info
command = [
"unison", "-batch",
"-ignore=Name {.git*,.vagrant/,*.DS_Store}",
"-sshargs", "-p #{ssh_info[:port]} -o StrictHostKeyChecking=no -i #{keypath}",
hostpath,
"ssh://#{ssh_info[:username]}@#{ssh_info[:host]}/#{guestpath}"
]
This will probably break something for some folks, so consider yourself warned. Hope it helps someone who is wrestling with the problem.
I still get this error on 0.0.4.
EDIT: I see now that this is a very old version. I'll open a new issue with not being able to install anything newer than 0.0.4
When I try to do a
vagrant sync
it can't seem to read my vagrant SSH key to do the sync.vagrant ssh
works as expected. Unison pops up, but asks for a password. The "insecure_private_key" file does exist.Full output:
Vagrantfile: