Google Source Repository可以使用应用程序默认凭据进行身份验证吗?

时间:2019-03-01 19:11:13

标签: gcloud google-source-repositories

我正在尝试使用应用程序默认凭据(即$font-size-root中的文件)克隆存储在Google Source Repository上的存储库。

不幸的是,这似乎不起作用:

$font-size-base

这可能吗?

1 个答案:

答案 0 :(得分:0)

If you are cloning the repository using the CLI gcloud source repos clone yourRepo you don't need to set credentials ( this is only needed when using the GCP client libraries )

But you need to be logged with an account that has at least the source.reader role granted.

To check if you are logged run gcloud auth list:

  • If no accounts are shown run gcloud auth login yourAccount to log in.
  • If there are accounts shown and you want to change the active account run gclud config set account yourAccount