gpt4 book ai didi

curl - 获取 curl : (60) SSL certificate error with aws command

转载 作者:太空宇宙 更新时间:2023-11-03 15:00:34 25 4
gpt4 key购买 nike

当我在终端上使用 aws ls myBucketaws mkdir newBucket 访问我的 S3 时,我得到:

curl: (60) SSL certificate problem: Invalid 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.

我不熟悉curl,如何解决这个问题?我的操作系统是 OSX 10.9.2

谢谢!

最佳答案

您的桶中是否包含点,例如 com.example.mybucket ?我还假设你使用这个 aws Perl client蒂姆·凯?

如果是,则问题与此客户端在后台执行 virtual-hosted-style requests 的事实有关。 ,例如 GET https://com.example.mybucket.s3.amazonaws.com/... .

Note: you can verify this as follow: aws --curl-options="-v" ls com.example.mybucket 2>&1 | grep "About to connect"

这种虚拟主机风格的请求会导致 certificate verification problem .

所以,我强烈建议您使用官方 AWS Command Line Interface 。使用它非常简单:

aws s3 ls com.example.mybucket

或者,穷人的解决方案是关闭 curl 详述的证书验证,如下所示:

aws --curl-options="-k" ls com.example.mybucket

关于curl - 获取 curl : (60) SSL certificate error with aws command,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22653653/

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