2

My company uses a proxy. I am using a Windows 10 notebook, 64 bit. Vagrant version 2.1.1. When trying to install a Vagrant plugin, e.g.

vagrant plugin install vagrant-proxyconf

I see the following error:

Installing the 'vagrant-proxyconf' plugin. This can take a few minutes...
ERROR: SSL verification error at depth 1: unable to get local issuer certificate (20)
ERROR: You must add /DC=net/DC=<MY_COMPANY>/DC=corp/CN=<CA-Name> to your local trusted store
Vagrant failed to load a configured plugin source. This can be caused by a variety of issues including: transient connectivity, proxy filtering rejecting access to a configured plugin source, or a configured plugin source not responding correctly. Please review the error message below to help resolve the issue:

SSL_connect returned=1 errno=0 state=error: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)

Source: https://rubygems.org/

I tried to the steps shown here: https://stackoverflow.com/questions/19872591/how-to-use-vagrant-in-a-proxy-environment

set http_proxy=http://user:password@host:port
set https_proxy=http://user:password@host:port
vagrant plugin install vagrant-proxyconf

but that didn't help.

After exporting the certificate mentioned (I hope it was the correct one; there are two certs with the same name) above and adding it to ...\HashiCorp\Vagrant\embedded\cacert.pem

(as suggested by Installing vagrant plugin on the corporate network), I got another SSL error:

Installing the 'vagrant-proxyconf' plugin. This can take a few minutes...
ERROR: SSL verification error at depth 2: unable to get issuer certificate (2)
Vagrant failed to load a configured plugin source. This can be caused by a variety of issues including: transient connectivity, proxy filtering rejecting access to a configured plugin source, or a configured plugin source not responding correctly. Please review the error message below to help resolve the issue:

SSL_connect returned=1 errno=0 state=error: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)

Source: https://rubygems.org/
  • There are probably multiple certificate stores in play. You need to add the proxy root certificate to all of them. – Daniel B Jun 26 '18 at 8:00
  • Do you know where I find that proxy root certificate? – Sebi Jun 26 '18 at 8:02
  • Ask the IT department or save it using your web browser. – Daniel B Jun 26 '18 at 8:07
  • Thanks for the tip, Daniel B. Our IT department had a couple of certificates which had to be appended to ...\HashiCorp\Vagrant\embedded\cacert.pem It's working fine now. – Sebi Jun 26 '18 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.