use '-o IdentityFile=' instead of '-i'
fixes ssh failure when path to the key contains '%'.
This commit is contained in:
parent
4d30018665
commit
35f83b6fed
|
@ -135,7 +135,11 @@ module Vagrant
|
|||
# If we're not in plain mode and :private_key_path is set attach the private key path(s).
|
||||
if !plain_mode && options[:private_key_path]
|
||||
options[:private_key_path].each do |path|
|
||||
command_options += ["-i", path.to_s]
|
||||
|
||||
# Use '-o' instead of '-i' because '-i' does not call
|
||||
# percent_expand in misc.c, but '-o' does. when passing the path,
|
||||
# replace '%' in the path with '%%' to escape the '%'
|
||||
command_options += ["-o", "IdentityFile=%s" % [path.to_s.gsub('%', '%%')]]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue