git aws.push: 'aws.push' is not a git comm

2019-05-03 03:45发布

From my site/application directory:

$ git aws.push
git: 'aws.push' is not a git command. See 'git --help'.

git --help doesn't help.

All the posts I have read were written before EB Command Line Interface (CLI) 3.x was a thing.

I followed the official instructions here: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-getting-set-up.html

And here: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_PHP_eb.sdlc.html

Unfortunately, the latter still says to:

$ export PATH=$PATH:<path to unzipped eb CLI package>/eb/linux/python2.7/

But I don't know that path because I didn't download and unzip a package. I installed awsebcli using pip, as per the instructions on the first link above.

Everything else seems to be in place. I have WordPress configured and running locally (OS X/Apache) with the remote RDS MySQL database. Not that the contents of the application matter. My AWS IAM credentials are entered (via the prompt).

eb create commands works! And it uploads my local application (files) perfectly. But I don't want to create a new application/environment. I already have one and I just want to git push my files to it.

1. How can I find /eb/linux/python2.7/ so I can set that PATH?
2. Is there some other reason/solution?

2条回答
Lonely孤独者°
2楼-- · 2019-05-03 04:32

Solution:

eb deploy

Turns out eb --help WAS a big help.

But stupidly enough, it was as I sat there staring blankly at the screen that a memory jogged and I recalled seeing the command eb deploy somewhere else (on a website).

I tried it. It worked.

If you are using AWS Elastic Beanstalk CLI 3.x

Do not use git aws.push!

Instead, use eb deploy to update your application version.

查看更多
走好不送
3楼-- · 2019-05-03 04:32

I had the same issue. I was using aws.push to update my application. Then I moved to a new computer and I had to set everything up again.

You can use

eb deploy

However, depending upon how you have your project setup, you might need to map your deployment to a branch. Use:

eb branch

I was in a bind and wanted to make sure that I did not screw up a deployment by introducing any new issues into the production environment and I wanted to use:

git aws.push

This can still be done.

Download the deprecated version of the AWS Elastic Beanstalk Command Line Tool here

Then from within your repo run AWSDevTools-RepositorySetup.sh. You can find this file in the zip file you just downloaded, AWS-ElasticBeanstalk-CLI-2.6.4 / AWSDevTools / Linux

Now run

git aws.config

Once configured you should be able to run git aws.push without any problems.

I am now using eb deploy, but I was in a bind and had never used it and did not have time to test it. So this worked for me.

查看更多
登录 后发表回答