Vagrant:公司代理背后的 SSL 验证错误

Vagrant:公司代理背后的 SSL 验证错误

我的公司使用代理。我使用的是 Windows 10 笔记本电脑,64 位。Vagrant 版本 2.1.1。尝试安装 Vagrant 插件时,例如

vagrant plugin install vagrant-proxyconf

我看到以下错误:

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/

我尝试按照这里显示的步骤操作: 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

但这并没有帮助。

导出上面提到的证书(我希望它是正确的;有两个同名的证书)并将其添加到 ...\HashiCorp\Vagrant\embedded\cacert.pem 后

(根据建议在公司网络上安装 vagrant 插件),我又收到一个 SSL 错误:

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/

相关内容