Vagrant up命令出现SSL错误。

7

看起来错误的发生是因为我在公司防火墙后面,至少那是我的理论。

我已经尝试了错误信息建议的选项并使用 --insecure 标志运行 vagrant up,但这不是 up 命令的选项,而仅适用于 add 命令。然而,我已经有了一个 Vagrantfile 和所有相应的配置,所以我只需要运行 vagrant up。这里的解决方案是什么?

vagrant up

    Bringing machine 'default' up with 'virtualbox' provider...
    ==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and in
    stall...
        default: Box Provider: virtualbox
        default: Box Version: >= 0
    The box 'ubuntu/trusty64' 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/ubuntu/trusty64"]
    Error: SSL certificate problem: self signed certificate in certificate chain
    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.

sdfsdf

3个回答

15
config.vm.box_download_insecure = true #added by Amos for curl error

对于像我这样的新手来说,确切地找到添加位置有点困难。但是在打开和编辑克隆目录中的所有vagrant相关文件之后,我终于弄清楚了。<br/>为了帮助像我这样的人,我们需要在Vagrant文件(名为Vagrantfile)中添加此行,该文件位于克隆目录(vagrant-boxes\OracleDatabase\XX.X.X)中。<br/>然后只需保存并运行“vagrant up”,这就解决了我的错误。 - kAmol

15

您可能需要分两步进行。

  1. 使用 insecure 标志下载文件夹

vagrant box add ubuntu/trusty64 --insecure
  • 启动你的虚拟机

    vagrant up
    

  • 在你的Vagrant文件中 - Amos Kosgei
    要添加到哪里?是哪个目录下的哪个文件?是在 vagrant-boxes\OracleDatabase\19.3.0 目录下吗? - kAmol

    0
    如果您想要特定的盒子版本,请使用以下链接
    vagrant box add laravel/homestead --insecure --box-version=12.1.0 --provider=virtualbox
    

    网页内容由stack overflow 提供, 点击上面的
    可以查看英文原文,
    原文链接