Activate Service Account from GCloud

不想你离开。 提交于 2019-12-11 02:59:11

问题


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.

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

I also see the environment variable if I call the env command

$ env
...
CLOUDSDK_PYTHON_SITEPACKAGES=1

Am I doing something wrong?


回答1:


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.



来源:https://stackoverflow.com/questions/23682687/activate-service-account-from-gcloud

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!