【问题标题】:how to authenticate correctly to Google Cloud Source Repositoriess with sdk如何使用 sdk 正确地向 Google Cloud Source Repositoriess 进行身份验证
【发布时间】:2018-09-18 03:00:48
【问题描述】:

我已按照Google Cloud Source Repositoriessource.cloud.google.com 中提供的步骤进行操作

  1. gcloud init && git config --global credential.https://source.developers.google.com.helpergcloud.cmd
  2. git 远程添加谷歌https://source.developers.google.com/p/[Project-id]/path
  3. git push --all google

但我得到了错误: 无效的身份验证凭据

我很沮丧按照这些步骤无法完成任务

【问题讨论】:

    标签: git google-cloud-platform google-cloud-repository


    【解决方案1】:

    执行以下步骤 - 它对我有用

    您将获得新生成的身份验证凭据。你需要copy 那和paste 在你的cmd。然后它会完美地工作。

    【讨论】:

      【解决方案2】:

      我确实为adding repositories 执行了这些步骤,并且工作正常。

      在某些情况下,您可能无权访问 Cloud SDK。例如,您可能在无权访问这些工具的构建服务器上工作。在这些情况下,您可以手动生成静态凭据。

      导航到repository page

      找到存储库并单击克隆。

      将首选身份验证方法更改为手动生成的凭据。

      按照说明使用生成的凭据。

      【讨论】:

      • 是的,我这样做了,它成功了 :D,实际上我试图访问它的帐户是所有者(我),所以我不知道为什么它不起作用
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-07-22
      • 1970-01-01
      • 2022-12-17
      • 2018-12-29
      • 1970-01-01
      • 2018-11-25
      • 1970-01-01
      相关资源
      最近更新 更多