gsutil提供失败:PyCrpto库不支持PKCS12格式 [英] gsutil giving Failure: PKCS12 format is not supported by the PyCrpto library

查看:88
本文介绍了gsutil提供失败:PyCrpto库不支持PKCS12格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试按中指定的对象存储通知配置 https://developers.google.com/storage/docs/object-change -notification#_Service_Account

I was trying object storage notification configuration as specified in https://developers.google.com/storage/docs/object-change-notification#_Service_Account

我遵循了确切的步骤,但是在运行"gsutil ls"命令时出现以下错误:

I followed the exact steps however on running 'gsutil ls' command I get following error:

/usr/local/gsutil/gsutil ls 
Failure: PKCS12 format is not supported by the PyCrpto library. Try converting to a "PEM" (openssl pkcs12 -in xxxxx.p12 -nodes -nocerts > privatekey.pem) or using PyOpenSSL if native code is an option..

我尝试按照错误消息中的指示转换为PEM,并使用gsutil config -e重新配置,但对于PEM格式返回了相同的错误.

I tried converting to PEM as instructed in error message and reconfigured using gsutil config -e, but it returned the same error for PEM format.

我的gsutil版本是3.37 我已经编译并安装了pycrypto-2.6

My gsutil version is 3.37 I have compiled and installed pycrypto-2.6

请帮助我摆脱这个错误

推荐答案

因此,这里的幕后似乎有些错误.其中之一是gsutil使用的向您报告此错误的库无法正确识别PEM文件,这就是为什么在运行该命令后一切仍然无法正常工作的原因.我们将为下一个gsutil版本修复此问题.

So, it looks like there are a couple of things going wrong behind the scenes here. One of which is that the library used by gsutil that's reporting this error to you fails to correctly identify PEM files, which is why things still didn't work after running that command. We'll work on getting this fixed for the next release of gsutil.

短期内,您可以安装PyOpenSSL吗?那应该与PKCS12文件一起使用.您可以使用类似的方法做到这一点:

In the short term, can you install PyOpenSSL? That should work with the PKCS12 file. You can do this with something like:

easy_install pyOpenSSL

pip install  pyOpenSSL

(为此,您可能需要使用sudo).

(you'll probably need to use sudo for this).

这篇关于gsutil提供失败:PyCrpto库不支持PKCS12格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆