我可以在Windows的Git Bash中使用gcloud吗? [英] Can I use gcloud in Git Bash on Windows?

查看:135
本文介绍了我可以在Windows的Git Bash中使用gcloud吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我已经安装了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:

Git Bash看不到我的路径

这篇关于我可以在Windows的Git Bash中使用gcloud吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆