[英]GCP | How to gcloud init in PowerShell
When running gcloud init on PowerShell, the scripts seems to stop short and won't keep running.在 PowerShell 上运行 gcloud init 时,脚本似乎突然停止并且不会继续运行。
gcloud init
What it shows:它显示了什么:
python.exe : Welcome! This command will take you through the configuration of gcloud.
At C:\Users\minh.tran\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\gcloud.ps1:117 char:3
+ & "$cloudsdk_python" $run_args_array
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Welcome! This c...tion of gcloud.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Settings from your current configuration [dev-finops] are:
accessibility:
screen_reader: 'False'
core:
account: minh.tran@hireright.com
disable_usage_reporting: 'True'
project: prj-d-finops
proxy:
address: 10.35.2.194
password: HireR1ght2022!
port: '8080'
type: http
username: corp\minh.tran
Pick configuration to use:
[1] Re-initialize this configuration [dev-finops] with new settings
[2] Create a new configuration
[3] Switch to and re-initialize existing configuration: [default]
gcloud init running on cloud shell or cmd will return the following and wait for user input:在云 shell 或 cmd 上运行的 gcloud init 将返回以下内容并等待用户输入:
Welcome! This command will take you through the configuration of gcloud.
Settings from your current configuration [dev-finops] are:
accessibility:
screen_reader: 'False'
core:
account: minh.tran@hireright.com
disable_usage_reporting: 'True'
project: prj-d-finops
proxy:
address: 10.35.2.194
password: HireR1ght2022!
port: '8080'
type: http
username: corp\minh.tran
Pick configuration to use:
[1] Re-initialize this configuration [dev-finops] with new settings
[2] Create a new configuration
[3] Switch to and re-initialize existing configuration: [default]
Please enter your numeric choice:
How do I get gcloud init to run on PowerShell?如何让 gcloud init 在 PowerShell 上运行? What issue do I have here?我这里有什么问题?
Please see the below requirement:请看下面的要求:
Cloud SDK requires Python; supported versions are Python 3 (3.5 to 3.9). By default, the Windows version of Cloud SDK comes bundled with Python 3. To use Cloud SDK, your operating system must be able to run a supported version of Python.
In order to install python 3.9 on windows, just use this installer https://www.python.org/ftp/python/3.9.13/python-3.9.13-amd64.exe .为了在 windows 上安装 python 3.9,只需使用此安装程序https://www.python.org/ftp/python/3.9.13/python-3.9.13-amd64.exe 。
Be sure to close and reopen the powershell prompt after installation in order to load the new PATH where python executable is added.确保在安装后关闭并重新打开 powershell 提示,以便加载添加了 python 可执行文件的新 PATH。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.