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/