从GCloud激活服务帐户 [英] Activate Service Account from GCloud
问题描述
我正在尝试为Google云端存储存储桶配置通知对象更改,但是当我试图让gsutil使用这个命令的服务帐户时,我卡住了。
I'm trying to configure a notification for a Google Cloud Storage bucket object change however I'm stuck when trying to make gsutil use a service account with this command.
gcloud auth activate-service-account service-account-email --key-file path/to/key.p12
我在命令行中得到的错误是:
The error I get in the command line is:
ERROR: (gcloud.auth.activate-service-account) PyOpenSSL is not available. If you have already installed PyOpenSSL, you will need to enable site packages by setting the environment variable CLOUDSDK_PYTHON_SITEPACKAGES to 1. If that does not work, See https://developers.google.com/cloud/sdk/crypto for details.
我遵循这个指令来获取pyOpenSSL 。如果我询问有关该软件包的pip,它会告诉我它已安装
I followed this instructions to get pyOpenSSL. If I ask pip about that package it tells me it is installed
$ pip show pyopenssl
---
Name: pyOpenSSL
Version: 0.14
Location: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Requires: cryptography, six
如果我调用env命令,还会看到环境变量
I also see the environment variable if I call the env command
$ env
...
CLOUDSDK_PYTHON_SITEPACKAGES=1
我做错了什么?
推荐答案
这表明PyOpenSSL没有正确安装。由于PyOpenSSL包含加密例程,因此Cloud SDK无法轻松打包,因此我们依赖第三方安装。
This indicates that PyOpenSSL was not properly installed. Since PyOpenSSL includes crypto routines, the Cloud SDK can not easily package it and we rely on third-party installation.
这篇关于从GCloud激活服务帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!