0

I'm setting up deployment to AWS Elastic Beanstalk using AWS CodeBuild.

However, I'm getting the following error when trying to deploy the application:

eb deploy staging --verbose
ERROR: CommandError - An error occurred while handling git command.
Error code: 128 Error: error: Could not read 121c8263f48a23a0fc66af9989cc9ca8bffaae01
fatal: Failed to traverse parents of commit a9c6e3340d50d603fc7d21b3d10edcc5d2ba47ab
Carlos Martinez
  • 4,350
  • 5
  • 32
  • 62

1 Answers1

4

This bit me for hours.

The problem was that the AWS Codebuild project was configured to do a Shallow clone with:

Git clone depth = 1

For some reason, the EB CLI requires to have a full clone. To fix this, I had to configure the project to do a full clone with:

Edit project -> Update source -> Git clone depth -> Full

Carlos Martinez
  • 4,350
  • 5
  • 32
  • 62