Magento-cloud
CLI未显示活动环境
问题
有多个活动环境,您正在尝试通过运行Magento-cloud
CLI (命令行工具)命令与环境交互。 (例如: ssh
、db:size
、db:sql
等)
但是,提示选择所需环境时不会列出此环境。 (例如:集成环境)
Enter a number to choose an environment:
Default: master
[0] integration2 (type: development)
[1] master (type: development)
[2] production
[3] staging
>
原因
由于部署正在进行、停滞或失败,环境可能不可用。
解决方案
您将需要手动使用e|-environment
标志指定环境。
- 查找活动环境的列表并记下环境名称:
$ magento-cloud environment: list |grep "Active\|ID"
Your environments are:
| ID | Title | Status | Type |
| Master | Master | Active | Development |
| Production | Production | Active | Production |
| Staging | Staging | Active | Staging |
| Integration | Integration | Active | Development |
| Integration 2 | Integration 2 | Active | Development |
2.使用命令指定环境的ID:
magento-cloud ssh -e integration
recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a