google-app-engine - 为什么 gcloud components update 命令总是显示重启命令
问题描述
当我想将我的 Go 应用程序部署到 App Engine 时,我发现我必须安装 app-engine-go。它甚至说安装在一个新窗口上,没有弹出窗口。
https://github.com/ChihchengHsieh/ProblemsScreenShot/blob/master/image-2.png
C:\go-work\src\orderFunc>gcloud app deploy
The component [app-engine-go] is required for staging this
application.
Restarting command:
$ gcloud components install app-engine-go
Installing component in a new window.
Please re-run this command when installation is complete.
$ gcloud app deploy
当我运行命令gcloud components install app-engine-go
andgcloud components update
时,它显示:
https://github.com/ChihchengHsieh/ProblemsScreenShot/blob/master/image.png
C:\go-work\src\orderFunc>gcloud components install app-engine-go
Restarting command:
$ gcloud components install app-engine-go
C:\go-work\src\orderFunc>gcloud components update
Restarting command:
$ gcloud components update
C:\go-work\src\orderFunc>gcloud components install app-engine-go
Restarting command:
$ gcloud components install app-engine-go
我已经尝试重新安装谷歌云 SDK,但它是一样的。
我希望它可以显示一些安装过程。
解决方案
我试图为 .NET Google App Engine 应用程序部署快速入门,但遇到了同样的问题。我的问题是我需要执行$ gcloud components install beta
才能部署我的 GAE .NET 应用程序。我得到了和你一样的行为。PowerShell 会打印
Restarting command:
$ gcloud components install beta
但实际上什么也没发生。在我运行命令的同一窗口中没有弹出窗口或安装进度。用于安装或更新组件的其他命令也没有工作。我只能用 列出它们$ gcloud components list
,但不能安装或更新它们中的任何一个。
解决方案
我注意到,如果您以管理权限运行 PowerShell,它将在C:\Windows\system32
目录中打开一个窗口。如果您在那里执行命令,则会弹出另一个窗口并继续安装或更新 gcloud 组件。但是,如果您cd
进入不同的目录,则行为将如本期所述。
所以要解决这个问题:
- 以管理员身份运行 PowerShell
- 如果目录与我上面描述的不同,则执行
$ C:\Windows\system32
否则转到步骤 3 - 对 gcloud 组件执行您想要的任何命令。例如
$ gcloud components update
或gcloud components install beta
等。 - 应弹出一个窗口并继续安装或更新组件。
推荐阅读
- python - 用于从 AWS Athena 查询 S3 CloudFront 访问日志并将选择查询导入 S3 存储桶的 Python 脚本
- elasticsearch - 将_routing与脚本中的另一个文档字段进行比较
- python - numpy ndarray 到 pandas 数据框
- javascript - WP ACF 动态
- xamarin.forms - Infinite smooth horizontal scrolling carousel in Xamarin forms?
- flutter - 如何在颤动中设计自定义 ListWheelScrollView,如下图所示?
- r - Colnames loop in R, combining characters with variables
- python - Kivy: How to change size of widget using on_touch_move function?
- swift - Detect if face is within a circle
- dgraph - 在单个命令中启动零 alpha 和 ratel,例如在 MacOSX 和其他环境中