2014-03-26 94 views
0

當我使用aws ls myBucketaws mkdir newBucket我的終端上訪問我的S3,我得到:獲取捲曲:使用AWS命令(60)SSL證書錯誤

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. 

我不熟悉的捲曲,如何解決此問題問題?我的操作系統是OSX 10.9.2

謝謝!

回答

0

您的存儲桶是否包含點,例如com.example.mybucket?我還假設你使用Tim Kay的aws Perl client

如果是,那麼問題與幕後這個客戶端執行virtual-hosted-style requests的事實有關,例如GET https://com.example.mybucket.s3.amazonaws.com/...

注意:你可以驗證這一點如下: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 

另外,可憐的人的解決方法是關閉證書驗證通過捲曲,詳細,如下:

aws --curl-options="-k" ls com.example.mybucket 
相關問題