2

在尝试将新版本的应用程序代码(Django 应用程序)部署到 AWS Elastic Beanstalk 环境时,我遇到以下错误:

git aws.push
Counting objects: 1648, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (970/970), done.
Writing objects: 100% (1505/1505), 336.19 KiB, done.
Total 1505 (delta 989), reused 645 (delta 436)
remote: 
remote: error: Encountered corrupt pack file: Git command exited with status code 128: error: Trying to write ref refs/heads/master with nonexistent object 8fce6c2b73f03ac271173f85026b3566ef304313
remote: fatal: Cannot update the ref 'refs/heads/master'.
remote: 
remote: 
To https://xxx:xxx@git.elasticbeanstalk.us-west-2.amazonaws.com/repos/xxx/environment-master
! [remote rejected] HEAD -> master (hook declined)
error: failed to push some refs to 'https://xxx:xxx@git.elasticbeanstalk.us-west-2.amazonaws.com/repos/xxx/environment-master'

我这边似乎没有任何改变。AWS 方面似乎也没有任何变化。几天前部署工作很顺利,但现在不行。

任何想法将不胜感激。谢谢!

编辑:这里是部署快照日志,显示了无数可能与 virtualenv 相关的问题: http: //pastebin.com/Ec0jHt0i

4

1 回答 1

0

可能是因为您超出了允许的最大版本数 (500)。

检查部署的版本数的命令:

elastic-beanstalk-describe-application-versions |grep '| git-'|wc -l

如果超过版本数,您可以要求 Amazon Web Services 团队增加对您的应用程序的限制,或者只删除过时的版本。

希望能帮助到你。

于 2013-12-15T21:20:49.440 回答