google-cloud-platform - 无法使用 gcloud 为 iam 帐户 GCP 创建密钥文件
问题描述
我正在尝试使用 gcloud 在 GCP 上为服务帐户创建一个密钥文件
gcloud iam service-accounts keys create ~/.config/gcloud/key.json \
--iam-account terraform@$myproject.iam.gserviceaccount.com
不幸的是,它响应
(gcloud) Unable to create private file [~/.config/gcloud/key.json]: [Errno 2] No such file or directory: '~/.config/gcloud/key.json'
文件夹
'~/.config/gcloud/'
存在。
解决方案
问题是:
'~/.config/gcloud/'
这应该是
'/home/mike/.config/gcloud/'
正如约翰汉利正确指出的那样。
推荐阅读
- c# - Linq 和左连接
- javascript - 如何在不触发 postpublish 的情况下运行发布?
- c++ - typeid("") != typeid(const char*)
- python - 我无法在 facebook 中获取 id 的标签
- python - 在 PyQt5 中显示 QMenu 的问题
- tsql - 在 Management Studio 中使用 BEGIN TRANSACTION 有多危险?
- unit-testing - .Net 核心单元测试 (xunit) - 处理数据库
- javascript - Javascript 如何检查多个等待异步 mssql 数据库请求结果是否有错误?
- rest - 尽管响应中有“no-cache”标头,但仍缓存 HTTP 响应
- javascript - 如何在 Vue 中从子组件更改和渲染源数组