Google Cloud SDK gcloud init

I have installed Google Cloud SDK and Git, but when I try to run gcloud init overseas-966

(my project name) I get this error message:

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 was downloaded from [ http://git-scm.com/downloads] and the Git path is in your PATH environment variable. Please give me some advice.

+3


source to share


2 answers


This error occurs when gcloud tries to execute 'git' and it fails for whatever reason (not necessarily when git is not on the path).

Assuming you only need to clone the repo, you can achieve the same result by running

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



gcloud must be on your way for the above to work.

If the issue persists, please report the bug at https://code.google.com/p/google-cloud-sdk/issues/list with the conclusion gcloud info

(personal information removed).

+1


source


I also faced this problem, but I already had my project setup.

Taken from Google Release Notes :



0.9.89 (2015/12/02)

gcloud Core

  • Changed the behavior of the gcloud init

    git repository parameter . It now accepts the input path to the target directory for the repository rather than the parent directory of the repository target.

I think this is the change it refers to. You can update the Cloud SDK components by running gcloud components update

. Perhaps updating your components will help fix the situation.

0


source







All Articles