我已经安装了Google Cloud SDK,并且正在按照Git Bash中Windows 10上的说明进行初始化,即运行gcloud init
。但是,输出文本似乎已被切断。
这是唯一的输出
$ gcloud init
Welcome! This command will take you through the configuration of gcloud.
Settings from your current configuration [viviangmail] are:
core:
account: example@google.com
disable_usage_reporting: 'True'
当我在命令提示符中运行相同的命令时,它可以正常工作。请参阅下面的完整输出。但是我不想使用命令提示符。我习惯了Git Bash。
C:\Users\Vivian>gcloud init
Welcome! This command will take you through the configuration of gcloud.
Settings from your current configuration [viviangmail] are:
core:
account: example@google.com
disable_usage_reporting: 'True'
Pick configuration to use:
[1] Re-initialize this configuration [viviangmail] with new settings
[2] Create a new configuration
[3] Switch to and re-initialize existing configuration: [default]
Please enter your numeric choice:
为什么gcloud init
在Git Bash中不起作用?
答案 0 :(得分:0)
或者,您可以使用Windows Subsystem for Linux (WSL)会话,看看问题是否仍然存在。
关于bash会话,请尝试在CMD中键入git bash --login -i,在该CMD中,您首先设置了简化的PATH:
set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%
然后查看问题是否仍然存在(使用适用于Windows的最新Git 2.21)