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

匿名 (未验证) 提交于 2019-12-03 08:48:34

问题:

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?

回答1:

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.



回答2:

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.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!