2015-07-06 120 views
3

我安裝的是谷歌雲SDK和Git,但是當我嘗試運行gcloud init overseas-966(我的項目名稱),我收到此錯誤信息:谷歌雲SDK gcloud初始化

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環境變量中。請給我一些建議。

回答

1

此錯誤時gcloud試圖執行「混帳」時,以任何理由失敗(不一定在Git是不是路徑)。

假設你只在乎克隆回購,則可以通過運行

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下一個bug,用gcloud info輸出(個人信息已刪除)。

+0

我應該補充一點,我的git版本命令也會輸出'git version 1.9.5.msysgit.1',它工作正常。 – cherba

0

我也遇到過這個問題,但我已經完成了我的項目設置。

Google's Release Notes摘自:

0.9.89(2015年12月2日)

gcloud核心

  • gcloud init的Git倉庫克隆選項的行爲改變。它現在將輸入到存儲庫目標目錄的路徑,而不是存儲庫目標的父目錄。

我認爲這是它所指的改變。您可以通過運行gcloud components update來更新您的Cloud SDK組件。也許更新你的組件可以解決問題。