I had an SSL error today whilst trying to use the puppet module tool to search the forge. Luckily plenty of others have had this problem - however, the original solution doesn't work with recent versions of RVM.

iMac:modules$ puppet module --modulepath=. search augeasproviders
Notice: Searching https://forge.puppetlabs.com ...
Error: Could not connect via HTTPS to https://forge.puppetlabs.com
  Unable to verify the SSL certificate
    The certificate may not be signed by a valid CA
    The CA bundle included with OpenSSL may not be valid or up to date
Error: Try 'puppet help module search' for usage
The problem stems from the openssl client not being able to find a root CA certificates file. If you're using a packaging tool like Homebrew or MacPorts, the newer RVM will have used it to install dependencies for Ruby - including OpenSSL. This may mean you don't have up to date root CA certificates.

With Homebrew it's a simple case of:

iMac:modules$ brew install curl-ca-bundle
==> Downloading https://downloads.sourceforge.net/project/machomebrew/mirror/cur

################################################################## 100.0%

iMac:modules$ export SSL_CERT_FILE=/usr/local/opt/curl-ca-bundle/share/ca-bundle.crt

And now the module tool should work just fine.


Comments

comments powered by Disqus