Reputation: 711
So, I've installed Git, Git Bash, Python2.7, and I've just installed the Google Cloud SDK per the official guide. Using Windows 10.
In cmd.exe, or the "Google Cloud SDK Shell", gcloud
works fine.
Within Git Bash, however (the terminal that I prefer to use), gcloud
returns the following output (screenshot).
echo $PATH
in Git Bash does include the path to the Google SDK (highlighted here).
Am I missing something? Is there anything in $PATH that is possibly conflicting with gcloud, or did I misconfigure the path somehow?
I appreciate any insight.
UPDATE. Here is the output of env|grep PATH
. I'm not sure what it tells me. Any other executable in the PATH is working (vagrant, conda, python, etc), but gcloud is not.
Upvotes: 24
Views: 19383
Reputation: 11
Another option - copying the gsutil
and bq
files from Linux version to /google-cloud-sdk/bin on Windows.
Upvotes: 0
Reputation: 2347
Put the following in a .bashrc file which should be located in C:\Users\YourWindowsAccount:
gcloud() {
"gcloud.cmd" "$@"
}
export -f gcloud
Adapted from: https://askubuntu.com/a/98791
Restart Git Bash thereafter.
This solution is better than using aliases because it allows you to call gcloud from a shell script also.
Upvotes: 15
Reputation: 2171
Create ~/.bashrc
with one and only line:
alias gcloud="gcloud.cmd"
and restart you shell session. That's it.
Upvotes: 34
Reputation: 1455
You need to use the full file name i.e. gcloud.sh or gcloud.cmd. See the following question for more details:
Upvotes: 25