繁体   English   中英

控制点 | 如何在 PowerShell 中进行 gcloud init

[英]GCP | How to gcloud init in PowerShell

在 PowerShell 上运行 gcloud init 时,脚本似乎突然停止并且不会继续运行。

gcloud init

它显示了什么:

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]

在云 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:

如何让 gcloud init 在 PowerShell 上运行? 我这里有什么问题?

请看下面的要求:

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.

为了在 windows 上安装 python 3.9,只需使用此安装程序https://www.python.org/ftp/python/3.9.13/python-3.9.13-amd64.exe

确保在安装后关闭并重新打开 powershell 提示,以便加载添加了 python 可执行文件的新 PATH。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM