Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Elastic Beanstalk [remote rejected] (hook declined)

Following examples and tutorials for getting a PHP application up and running with AWS Elastic Beanstalk and getting errors when I try to push:

git aws.push
remote: 
remote: error: Internal Error
remote: 
To https://MYKEY:20120830T1133112489ce23684fb0061664e8de896cce922cf6d06981add734c00e356828847eb54@git.elasticbeanstalk.us-east-1.amazonaws.com/repos/4d7920466972737420256c6173746963204265616e7374616c6b204170706c69636174696f6e20456e7669726f6e6d656e6463/philsturgeon
 ! [remote rejected] HEAD -> master (hook declined)
error: failed to push some refs to 'https://MYKEY:20120830T1133112489ce23684fb0061664e8de896cce922cf6d06981add734c00e356828847eb54@git.elasticbeanstalk.us-east-1.amazonaws.com/repos/4d7920466972737420256c6173746963204265616e7374616c6b204170706c69636174696f6e20456e7669726f6e6d656e6463/philsturgeon'

What is the cause of this? Google does not seem to have any idea. I'd originally thought it due to my Host not matching, as the 2nd time you run aws.config it will not ask for a host, but after manually changing the config in .git/config it is still giving the same error.

[aws "endpoint"]
        us-east-1 = git.elasticbeanstalk.us-east-1.amazonaws.com
        ap-northeast-1 = git.elasticbeanstalk.ap-northeast-1.amazonaws.com
        eu-west-1 = git.elasticbeanstalk.eu-west-1.amazonaws.com
        us-west-1 = git.elasticbeanstalk.us-west-1.amazonaws.com
        us-west-2 = git.elasticbeanstalk.us-west-2.amazonaws.com
[alias "aws"]
        push = !git aws.elasticbeanstalk.push $@
        config = !git aws.elasticbeanstalk.config $@
[aws]
        accesskey = MYKEY
        secretkey = MYSECRET
        region = us-east-1
[aws "elasticbeanstalk"]
        host = git.elasticbeanstalk.us-east-1.amazonaws.com
        application = My First Elastic Beanstalk Application
        environment = philsturgeon

This config should be correct:

http://d.pr/i/ehwv

So, what is up here?

like image 941
Phil Sturgeon Avatar asked Aug 30 '12 11:08

Phil Sturgeon


1 Answers

You probably exceeded a limit in Elastic Beanstalk of 500 application versions. You need to delete old application versions via the Elastic Beanstalk Management Console, under the "Versions" tab.

like image 65
Avi Gershon Avatar answered Oct 01 '22 04:10

Avi Gershon