I was trying to push to AWS through their CLI, and I got this error:
remote: error: Unable to create application version: null
...
! [remote rejected] HEAD -> master (hook declined)
error: failed to push some refs to ...
I doubted that the issue was common enough that I would find a useful answer somewhere. Luckily, I was wrong! I found this on stackoverflow: http://stackoverflow.com/questions/12196134/aws-elastic-beanstalk-remote-rejected-hook-declined.
Apparently, it didn’t solve Phil Sturgeon’s problem. But it solved mine. I was at 488 versions. Even though that poster said the limit was 500, deleting some versions seemed to fix the problem.