3

我是 Vagrant 的新手,我使用 PuPHPet 构建了 vagrantfile,但是当我执行 vagrant up 命令时,我收到了这个错误:

λ vagrant up

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'puphpet/debian75-x64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box '["puphpet/debian75-x64"]' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:

URL: ["https://atlas.hashicorp.com/puphpet/debian75-x64"]
Error: SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
4

1 回答 1

0

如果您使用的是旧版本的 Vagrant,则包中的证书包可能会损坏。这似乎已在 1.7.2 中修复。如果由于某种原因您必须固定到较旧版本的 Vagrant,或者您仍然遇到最新版本的 Vagrant 问题,您可以将您的 ca-certificates.crt 复制到 Vagrant 的 cacert.pem 中:

cat /etc/ssl/certs/ca-certificates.crt >> /opt/vagrant/embedded/cacert.pem

或者你可以告诉 Vagrant 不要担心证书链被破坏,方法是在你的Vagrantfile中添加以下行:

config.vm.box_download_insecure = true

或通过指定喜欢的--insecure选项vagrant box add

vagrant box add --insecure puphpet/debian75-x64
于 2015-04-24T21:27:59.857 回答