You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何用gcloud命令查看Google Artifact Registry仓库的地域信息?

解决方法

问题出在你使用的format是gcloud格式化语法中的关键字,直接写会被解析成语法指令而非仓库的format字段,导致location字段被忽略。可以通过以下两种方式解决:

  • 方式一:用双引号包裹冲突字段名
    使用value格式时,给format字段加上双引号,明确指定这是仓库的属性字段:

    gcloud artifacts repositories list --format 'value(name,"format",location)'
    

    执行后会输出空格分隔的名称、格式、地域三个字段内容。

  • 方式二:改用table格式输出
    如果需要更清晰的列对齐展示,直接使用table格式,无需处理关键字冲突:

    gcloud artifacts repositories list --format 'table(name,format,location)'
    

内容的提问来源于stack exchange,提问作者Kossak

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.08 02:15:57