git aws.push上的包文件已损坏

git aws.push上的包文件已损坏,git,amazon-web-services,virtualenv,amazon-elastic-beanstalk,Git,Amazon Web Services,Virtualenv,Amazon Elastic Beanstalk,在尝试将新版本的应用程序代码(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 1

在尝试将新版本的应用程序代码(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相关的问题:

可能是因为您已超过允许的最大版本数(500)

用于检查已部署版本数的命令:

elastic-beanstalk-describe-application-versions |grep '| git-'|wc -l
如果超过了版本数,您可以要求AmazonWeb服务团队增加应用程序的限制,或者删除过时的版本


希望有帮助。

您是否尝试过在本地重新打包或GCG?是的,在看到提到的打包文件后,这是我做的第一件事,但似乎没有效果。