Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: failed to solve: failed commit on ref : unexpected status: 400 Bad Request

I am trying to build projects using Circle CI aws-ecr-orb to push to a private repository in AWS.

I get the error below:

#16 exporting to image
#16 sha256:7dd518c28ca8d9b4a669654c56822c182f0329e5b5897d4cc9241360bd781320
#16 pushing layers 3.4s done
#16 pushing manifest for ************.dkr.ecr.*********.amazonaws.com/***********:latest@sha256:73bcacc452698bb9bc03feb199ffde7d62016bfb46b783c436f9c8e5a8a69e32
#16 pushing manifest for ************.dkr.ecr.*********.amazonaws.com/***********:latest@sha256:73bcacc452698bb9bc03feb199ffde7d62016bfb46b783c436f9c8e5a8a69e32 0.3s done
#16 ERROR: failed to push ************.dkr.ecr.*********.amazonaws.com/***********:latest: failed commit on ref "manifest-sha256:73bcacc872698bb9bc03feb199ffde7d62016bfb46b783c436f9c8e5a8a69e32": unexpected status: 400 Bad Request
------
 > exporting to image:
------
error: failed to solve: rpc error: code = Unknown desc = failed to push ************.dkr.ecr.*********.amazonaws.com/***********:latest: failed commit on ref "manifest-sha256:73bcacc872698bb9bc03feb199ffde7d62016bfb46b783c436f9c8e5a8a69e32": unexpected status: 400 Bad Request

Exited with code exit status 1
CircleCI received exit code 1

I'm trying to understand why the error is coming up.

like image 697
Promise Preston Avatar asked Jan 31 '26 22:01

Promise Preston


1 Answers

I finally figured out the issue.

The issue was caused because I changed the tag mutability setting for the repository to IMMUTABLE.

All I had to do was to change the tag mutability setting for the repository to MUTABLE.

In Terraform AWS ECR module, I just had to add the settings below to the resource:

repository_image_tag_mutability        = "MUTABLE"

Resources: error: failed to solve: failed commit on ref : unexpected status: 400 Bad Request #200

like image 105
Promise Preston Avatar answered Feb 03 '26 05:02

Promise Preston



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!