我安装了Google Cloud SDK和Git,但当我尝试运行gcloud init overseas-966 (我的项目名称)时,我收到以下错误消息:
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.1Git是从[http://git-scm.com/downloads]下载的,Git路径在path环境变量中。请给我一些建议。
发布于 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 (删除个人信息)。
发布于 2016-01-22 02:53:33
我也遇到了这个问题,但我已经设置了我的项目。
0.9.89 (2015/12/02)
gcloud核心
gcloud init git存储库克隆选项的行为。现在,它将存储库目标目录的路径作为输入,而不是存储库目标的父目录。我认为这就是它所指的变化。您可以通过运行gcloud components update来更新您的Cloud SDK组件。也许更新你的组件会解决一些问题。
https://stackoverflow.com/questions/31236492
复制相似问题