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

Cloud Shell克隆.NET教程代码失败的问题咨询及报错详情

解决Cloud Shell克隆.NET教程仓库失败的问题

问题原因

  • 目标仓库默认分支已从master改为main,但Cloud Shell自动执行的克隆命令仍在使用旧分支名,导致分支不存在错误。
  • 自动克隆的仓库是第一个教程的项目,与当前Firestore会话处理教程不匹配。

解决步骤

  • 清理旧的无效克隆目录:
    rm -rf /home/kramffud/cloudshell_open/getting-started-dotnet
    
  • 手动克隆正确的仓库(使用main分支):
    git clone -b main https://github.com/GoogleCloudPlatform/getting-started-dotnet.git /home/kramffud/cloudshell_open/getting-started-dotnet
    
  • 进入项目目录继续后续操作:
    cd /home/kramffud/cloudshell_open/getting-started-dotnet
    
  • 关联你的实际项目“My Bookstore”:
    gcloud config set project "My Bookstore"
    

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.17 16:22:37