我严格按照这些说明进行操作,以允许我使用短期令牌身份验证方法从我们的 github 操作工作流程访问 gcloud 资源。
我已经使用上面的确切说明创建了服务帐户、工作负载身份池和 github 提供程序池,但身份验证步骤似乎并未获取正确的令牌(或根本没有任何令牌)。GCP 服务帐户具有正确的 IAM 权限。
在这gcloud compute instances list一步中,我收到错误:
ERROR: (gcloud.compute.instances.list) There was a problem refreshing your current auth tokens: ('Unable to acquire impersonated credentials: No access token or invalid expiration in response.', '{\n "error": {\n "code": 403,\n "message": "The caller does not have permission",\n "status": "PERMISSION_DENIED"\n }\n}\n')
Please run:
$ gcloud auth login
to obtain new credentials.
Run Code Online (Sandbox Code Playgroud)
我的github actions文件如下:
ERROR: (gcloud.compute.instances.list) There was a problem refreshing your current auth …Run Code Online (Sandbox Code Playgroud) 我需要一个 postgresql 语句来运行公共模式(所有表)并更新所有者。我知道手动命令是ALTER TABLE public.<table_name> OWNER TO <username>;
但是我不确定如何将其放入脚本/格式中,该脚本/格式将循环遍历每个表并更新所有者?
这是针对 postgres 9.6 数据库的(它将在测试数据库上运行)。
谢谢