Special error message if SCP is unavailable [GH-568]
This commit is contained in:
parent
98448d5557
commit
f44f1831ef
|
@ -7,6 +7,7 @@
|
|||
- Linux uses `shutdown -h` instead of `halt` to hopefully more consistently
|
||||
power off the system. [GH-575]
|
||||
- Tweaks to SSH to hopefully be more reliable in coming up.
|
||||
- Helpful error message when SCP is unavailable in the guest. [GH-568]
|
||||
|
||||
## 0.8.10 (December 10, 2011)
|
||||
|
||||
|
|
|
@ -245,6 +245,11 @@ module Vagrant
|
|||
error_key(:dotfile_error, "vagrant.actions.vm.persist")
|
||||
end
|
||||
|
||||
class SCPUnavailable < VagrantError
|
||||
status_code(56)
|
||||
error_key(:scp_unavailable)
|
||||
end
|
||||
|
||||
class SSHAuthenticationFailed < VagrantError
|
||||
status_code(11)
|
||||
error_key(:ssh_authentication_failed)
|
||||
|
|
|
@ -104,6 +104,12 @@ module Vagrant
|
|||
scp.upload!(from, to)
|
||||
end
|
||||
end
|
||||
rescue Net::SCP::Error
|
||||
# If we get the exit code of 127, then this means SCP is unavailable.
|
||||
raise Errors::SCPUnavailable if e.message =~ /\(127\)/
|
||||
|
||||
# Otherwise, just raise the error up
|
||||
raise
|
||||
end
|
||||
|
||||
# Checks if this environment's machine is up (i.e. responding to SSH).
|
||||
|
|
|
@ -52,6 +52,9 @@ en:
|
|||
multi_vm_required: "A multi-vm environment is required for name specification to this command."
|
||||
multi_vm_target_required: "`vagrant %{command}` requires a specific VM name to target in a multi-VM environment."
|
||||
no_env: "No Vagrant environment detected. Run `vagrant init` to set one up."
|
||||
scp_unavailable: |-
|
||||
SSH server on the guest doesn't support SCP. Please install the necessary
|
||||
software to enable SCP on your guest operating system.
|
||||
ssh_authentication_failed: |-
|
||||
SSH authentication failed! This is typically caused by the public/private
|
||||
keypair for the SSH user not being properly set on the guest VM. Please
|
||||
|
|
Loading…
Reference in New Issue