我可以在Windows的Git Bash中使用gcloud吗? [英] Can I use gcloud in Git Bash on Windows?
问题描述
因此,我已经安装了Git,Git Bash,Python2.7,并且刚刚安装了Google Cloud SDK
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.
在cmd.exe或"Google Cloud SDK Shell"中,gcloud
正常运行.
In cmd.exe, or the "Google Cloud SDK Shell", gcloud
works fine.
但是,在Git Bash(我更喜欢使用的终端)中,gcloud
返回以下输出(屏幕截图).
Within Git Bash, however (the terminal that I prefer to use), gcloud
returns the following output (screenshot).
echo $PATH
确实包含Google SDK的路径(此处已突出显示).
echo $PATH
in Git Bash does include the path to the Google SDK (highlighted here).
我错过了什么吗? $ PATH中是否有任何内容可能与gcloud冲突,或者我是否以某种方式错误地配置了路径?
Am I missing something? Is there anything in $PATH that is possibly conflicting with gcloud, or did I misconfigure the path somehow?
感谢您的见解.
更新.这是env|grep PATH
的输出.我不确定它会告诉我什么. PATH中的任何其他可执行文件都可以正常工作(vagrant,conda,python等),但gcloud无效.
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.
推荐答案
您需要使用完整的文件名,即gcloud.sh或gcloud.cmd.有关更多详细信息,请参见以下问题:
You need to use the full file name i.e. gcloud.sh or gcloud.cmd. See the following question for more details:
这篇关于我可以在Windows的Git Bash中使用gcloud吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!