Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

The commit could not be found in the cloned repository. This can be caused by using force push, or n

Jeyson Acero
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 9, 2024

Hi fellas, from some weeks ago I'm receiving this error in my pipelines

The commit could not be found in the cloned repository. This can be caused by using force push, or not having a deep enough clone.

 Puntually, the error it's produced in the build setup of the pipeline on a git reset instruction:

 

1+ umask 000
2
3
+ GIT_LFS_SKIP_SMUDGE=1 retry 6 git clone --branch="develop" https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/$BITBUCKET_REPO_FULL_NAME.git $BUILD_DIR
4
Cloning into '/opt/atlassian/pipelines/agent/build'...
5
Updating files: 95% (6074/6335)
6
Updating files: 96% (6082/6335)
7
Updating files: 97% (6145/6335)
8
Updating files: 98% (6209/6335)
9
Updating files: 99% (6272/6335)
10
Updating files: 100% (6335/6335)
11
Updating files: 100% (6335/6335), done.
12
13
+ git reset --hard 4e5d27fc840e01987b652ea0647b19468969e742
14
fatal: Could not parse object '4e5d27fc840e01987b652ea0647b19468969e742'.
15
16

This is intermittent as it fails randomly on any branch. Also after a fail If I click rerun after some minutes it succeeds. The pipeline in question has clone depth full.

1 answer

1 vote
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 12, 2024

G'day, @Jeyson Acero 

Welcome to the community!

We have an extensive KB that outlines the specific issue which I highly suggest you review at:

Troubleshooting Bitbucket Cloud Pipelines build with the error message: "The commit could not be found in the cloned repository. This can be caused by using force push or not having a deep enough clone"

If the suggested workaround did not resolve the issue, please raise a support ticket with us in our Support portal.

Regards,
Syahrul

Jeyson Acero
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 14, 2024

Hi Syahrul, thanks, I saw that article previsuly and I applied the suggestion about the depth clone, however it didn't work, I also raise a ticket in Atlassian, but I don't have a clear answer yet.

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 14, 2024

Hi @Jeyson Acero 

Thanks for the update. It looks like our Support engineer is actively looking into it, and it appears to be related to a bug. I suggest keeping the communication in the ticket to avoid confusion.

Regards,
Syahrul

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events