bash AWS Elastic Beanstalk:命令 eb list 不显示环境
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/42616316/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
AWS Elastic Beanstalk : the command eb list shows no environments
提问by ashdaily
I am using Elastic Beanstalk and I have created 3 different environments. I used awsebcli. All of a sudden the command eb list
doesn't show me my enviroments because of which I am unable to deploy the environment. The error I am getting is ERROR: This branch does not have a default environment. You must either specify an environment by typing "eb status my-env-name" or set a default environment by typing "eb use my-env-name".
I tried eb status 'my-env-name'
, again I got an error : ERROR: The environment name 'my-env-name' could not be found.
In short: I am unable to use any eb
command.
我正在使用 Elastic Beanstalk 并创建了 3 个不同的环境。我使用了awsebcli。突然之间,该命令eb list
没有显示我的环境,因此我无法部署环境。我得到的错误是ERROR: This branch does not have a default environment. You must either specify an environment by typing "eb status my-env-name" or set a default environment by typing "eb use my-env-name".
我尝试过eb status 'my-env-name'
,再次出现错误:ERROR: The environment name 'my-env-name' could not be found.
简而言之:我无法使用任何eb
命令。
回答by pinedax
The message itself is clear. You haven't set an environment for the branch you are working on.
消息本身很清楚。您尚未为正在处理的分支设置环境。
You can either switch to the branch it's configure, but this means the changes you have in the current branch won't be available on deploy, unless you merge thos changes or you can set an environment for the branch you currently are using the command eb use name-of-your-env
. This last can also be configured in the Elastic Beanstalk configuration file of your application.
您可以切换到它配置的分支,但这意味着您在当前分支中所做的更改在部署时将不可用,除非您合并这些更改或者您可以为当前正在使用的分支设置环境命令eb use name-of-your-env
。这最后一个也可以在您的应用程序的 Elastic Beanstalk 配置文件中进行配置。
Hope this helps.
希望这可以帮助。
回答by naXa
Did you forgot to run eb create --single
after eb init
?
难道你忘了运行eb create --single
后eb init
?
This command creates a new environment. See EB CLI Command Reference ?
此命令创建一个新环境。请参阅EB CLI 命令参考?