首页 > 解决方案 > AWS EB(Elastic Beanstalk)CLI 在 git bash 的命令行中不起作用

问题描述

AWS EB (Elastic Beanstalk) CLI 未在 git bash (Windows 10) 中运行。我已经从https://github.com/aws/aws-elastic-beanstalk-cli-setup/blob/master/README.md的 AWS 文档中成功安装了 AWS EB CLI 。最后,我设置了文档中提到的环境变量。所以“eb”命令正在 Windows Power shell 中工作。但是当我尝试从 GIT Bash / IntelliJ bash 提示符访问“eb”命令时,它不起作用。

与 windows power shell 一起工作正常:

PS C:\> eb --version
EB CLI 3.19.2 (Python 3.7.3) 

在“用户变量”->“路径”下设置如下环境变量:

环境变量设置窗口

尝试从 Git Bash 访问“eb”时,错误如下:

$ eb
bash: eb: command not found

$ echo $PATH
.....
......
/c/Users/xxxxxx/.ebcli-virtual-env/executables:

多次重新启动系统和命令行界面。

有人可以让我知道环境变量设置是否有问题,或者需要在 bash 环境中配置一些额外的东西吗?

标签: amazon-web-servicesamazon-elastic-beanstalkcommand-line-interface

解决方案


在互联网上使用不同的解决方案以及 AWS doc 建议进行了如此多的试验和错误之后,最后我可以使用 Windows 10 的 Git bash 中的“eb”。在我将以下位置放在我的环境变量路径中后,问题得到了解决:

C:\Users\XXXX\AppData\Roaming\Python\Python37\Scripts


推荐阅读