首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Google Cloud SDK gcloud init

Google Cloud SDK gcloud init
EN

Stack Overflow用户
提问于 2015-07-06 08:55:40
回答 2查看 2K关注 0票数 3

我安装了Google Cloud SDK和Git,但当我尝试运行gcloud init overseas-966 (我的项目名称)时,我收到以下错误消息:

代码语言:javascript
复制
G:\>gcloud init overseas-966
WARNING: `gcloud init` will be changing soon. To clone git repo consider using `
gcloud alpha source clone` command.
Initialized gcloud directory in [G:\overseas-966\.gcloud].
Cloning [https://source.developers.google.com/p/overseas-966/r/default] into [de
fault].
ERROR: Unable to initialize project [overseas-966], cleaning up [G:\overseas-966
].
ERROR: (gcloud.init) Cannot find git. Please install git and try again.

You can find git installers at [http://git-scm.com/downloads], or use
your favorite package manager to install it on your computer.

G:\>git --version``
git version 1.9.5.msysgit.1

Git是从[http://git-scm.com/downloads]下载的,Git路径在path环境变量中。请给我一些建议。

EN

回答 2

Stack Overflow用户

发布于 2015-07-07 03:49:59

这个错误发生在gcloud尝试执行' git‘的时候,不管是什么原因导致的失败(当git不在path中时不一定)。

假设您只关心克隆存储库,则可以通过运行以下命令来获得相同的结果

git clone https://source.developers.google.com/p/overseas-966/r/default --config credential.helper=gcloud.cmd

gcloud必须在你的路径上才能工作。

如果问题仍然存在,请在https://code.google.com/p/google-cloud-sdk/issues/list下提交错误,并输出gcloud info (删除个人信息)。

票数 1
EN

Stack Overflow用户

发布于 2016-01-22 02:53:33

我也遇到了这个问题,但我已经设置了我的项目。

摘自Google's Release Notes

0.9.89 (2015/12/02)

gcloud核心

  • 更改了gcloud init git存储库克隆选项的行为。现在,它将存储库目标目录的路径作为输入,而不是存储库目标的父目录。

我认为这就是它所指的变化。您可以通过运行gcloud components update来更新您的Cloud SDK组件。也许更新你的组件会解决一些问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31236492

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档