summaryrefslogtreecommitdiff
path: root/lib/chef/knife.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/knife.rb')
-rw-r--r--lib/chef/knife.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/chef/knife.rb b/lib/chef/knife.rb
index 3f234d7ce3..51ccb99955 100644
--- a/lib/chef/knife.rb
+++ b/lib/chef/knife.rb
@@ -428,6 +428,13 @@ class Chef
raise # make sure exit passes through.
when Net::HTTPServerException, Net::HTTPFatalError
humanize_http_exception(e)
+ when OpenSSL::SSL::SSLError
+ ui.error "Could not establish a secure connection to the server."
+ ui.info "Use `knife ssl check` to troubleshoot your SSL configuration."
+ ui.info "If your Chef Server uses a self-signed certificate, you can use"
+ ui.info "`knife ssl fetch` to make knife trust the server's certificates."
+ ui.info ""
+ ui.info "Original Exception: #{e.class.name}: #{e.message}"
when Errno::ECONNREFUSED, Timeout::Error, Errno::ETIMEDOUT, SocketError
ui.error "Network Error: #{e.message}"
ui.info "Check your knife configuration and network settings"