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.
Running gcloud CLI commands You can run gcloud CLI commands from the command line and from scripts and other automations—for example, when using Jenkins to automate Google Cloud tasks. Note: gcloud CLI reference documentation and examples use backslashes, \ , to denote long commands.
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).
Now that you have a basic idea of what Git Bash is, it’s also important to understand everything you can do with it. The app allows you to execute Linux commands, and run shell scripts, and it also allows you to navigate to text files and directories using the ls (list files) or cd (change directory) commands, or edit files using the vim command.
Like macOS and Linux, operating systems already have a command-line terminal where you can run Git and Linux commands directly. But for Windows, you have the Windows command prompt, which is a non-Unix terminal. How can you run Git and Linux commands in Windows? Git Bash will do the trick.
Git is a version control system for controlling changes in software development. Like macOS and Linux, operating systems already have a command-line terminal where you can run Git and Linux commands directly. But for Windows, you have the Windows command prompt, which is a non-Unix terminal.
Create ~/.bashrc
with one and only line:
alias gcloud="gcloud.cmd"
and restart you shell session. That's it.
You need to use the full file name i.e. gcloud.sh or gcloud.cmd. See the following question for more details:
Git Bash doesn't see my PATH
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With