添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

SSL Issues when trying to install plugin

vagrant plugin install vagrant-vbguest

Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
ERROR:  SSL verification error at depth 3: unable to get local issuer certificate (20)
ERROR:  You must add /C=US/O=Starfield Technologies, Inc./OU=Starfield Class 2 Certification Authority 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 issues, 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://gems.hashicorp.com/specs.4.8.gz)
Source: https://gems.hashicorp.com/
vagrant --version
Vagrant 2.1.2

Windows 10 64bit

vagrant plugin install vagrant-vbguest --plugin-clean-sources
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
Unable to resolve dependency: user requested 'vagrant-vbguest (> 0)'
          

@fnordfish yes I agree it's not an issue with this plugin. However I think people might end up here when trying to troubleshoot it - like me, a vagrant noob...

It appears that vagrant is using some other cacert file. Setting the openssl environment variable to the vagrant cacert file worked for me

set SSL_CERT_FILE=C:\HashiCorp\Vagrant\embedded\cacert.pem
vagrant plugin install vagrant-vbguest

Infact I found that another Ruby install configured the SSL_CERT_FILE file which might have been the culprit in the first place.

I didn't have cacert.pem in the embedded directory but this worked for me:

set SSL_CERT_FILE=C:\HashiCorp\Vagrant\embedded\gems\gems\httpclient-2.8.3\lib\httpclient\cacert.pem
vagrant plugin install vagrant-vbguest