user14628641
user14628641

Reputation: 31

AWS EB ( Elastic Beanstalk) CLI not working in the command line of git bash

AWS EB (Elastic Beanstalk) CLI not running in git bash (Windows 10). I have successfully installed the AWS EB CLI from AWS documentation at https://github.com/aws/aws-elastic-beanstalk-cli-setup/blob/master/README.md . At the end I have set the environment variables as mentioned in the doc. So "eb" command is working from Windows Power shell. But when I am trying to access the "eb" command from GIT Bash / IntelliJ bash prompt, it is not working.

Working fine with windows power shell:

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

Environment variable set as below under "User Variable" -> "Path":

Environment variable set windows

While trying to access the "eb" from Git Bash the error is as below:

$ eb
bash: eb: command not found

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

Restarted the system and commandline interfaces multiple time.

Can someone please let me know if there are some issue with environment variable set, or need to configure something additional in bash environment?

Upvotes: 2

Views: 3153

Answers (2)

Getafix
Getafix

Reputation: 141

The issue for me was a username with a space. The path would then look like this: C:\Users\fname lastname.ebcli-virtual-env\executables. The problem came about with the .bat files created by the AWS script did not wrap the path in double quotes. Windows then interprets it as multiple parameters.

I had to go edit eb.bat and path_exporter.bat and wrap the directives like this: (in eb.bat) CALL "C:\Users\fname lastname.ebcli-virtual-env\Scripts\activate.bat" @start CALL "C:\Users\fname lastname.ebcli-virtual-env\Scripts\eb.exe" %args% The EB cli seems to work properly now.

Upvotes: 0

user14628641
user14628641

Reputation: 31

After so many trial and error with different solution available in internet along with AWS doc suggestion, finally I can use "eb" from Git bash of windows 10. The problem fixed after I put the below location in my environment variable path:

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

Upvotes: 0

Related Questions