gpt4 book ai didi

curl - vagrant up 不能在 Windows 上工作

转载 作者:行者123 更新时间:2023-12-03 14:36:37 24 4
gpt4 key购买 nike

我正在关注官方 vagrant 文档
https://docs.vagrantup.com/v2/getting-started/index.html

我已经在 Windows 10 64 位处理器上安装了 vagrant 和 virtual box。
在命令提示符下运行这些命令后,我得到:

vagrant init hashicorp/precise32
vagrant up

错误如下图:
使用“virtualbox”提供程序将机器“默认”设置为...
==> 默认值:找不到框“hashicorp/precise32”。正在尝试查找并安装...
默认值:盒子提供者:virtualbox
默认值:盒子版本:>= 0
找不到框“hashicorp/precise32”或
无法在远程目录中访问。如果这是私有(private)
HashiCorp 的 Atlas 上的框,请验证您已通过以下方式登录 vagrant login .另外,请仔细检查名称。扩大的
URL 和错误信息如下所示:

网址:[“ https://atlas.hashicorp.com/hashicorp/precise32”]
错误:SSL 证书问题:无法获取本地颁发者证书
更多详情: http://curl.haxx.se/docs/sslcerts.html

curl 默认使用“捆绑包”执行 SSL 证书验证
证书颁发机构 (CA) 公钥(CA 证书)。如果默认
捆绑文件不够用,您可以指定一个备用文件
使用 --cacert 选项。
如果此 HTTPS 服务器使用由 CA 签名的证书
捆绑包,证书验证可能由于以下原因而失败
证书有问题(它可能已过期,或者名称可能
与 URL 中的域名不匹配)。
如果您想关闭 curl 对证书的验证,请使用
-k(或 --insecure)选项。

我该如何解决这个错误?

最佳答案

如果遇到 SSL 问题,可以尝试使用 --insecure 添加框选项

vagrant box add --insecure hashicorp/precise32 hashicorp/precise32

--insecure When present, SSL certificates won't be verified if the URL is an HTTPS URL



您可能需要清洁 ~/.vagrant.d/tmp/文件夹,如果您有一些未完成的传输

也可以下载ssl证书直接使用绕过错误
$ vagrant box add --cacert <certificate> box_name

关于curl - vagrant up 不能在 Windows 上工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32937994/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com