'Object Directory Does Not Exist' Error in Build Logs After Migrating Bamboo Home Directory
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
There are instances when the Git cache continues to reference the old Bamboo home location even after the home directory is transitioned to a new location. The following error message can be seen in the failing build logs: error: object directory <bamboo-home>/local-working-dir/_git-repositories-cache/<...>/.git/objects does not exist.
This document provides step-by-step guidance on resolving this issue.
Environment
All Bamboo versions after transitioning the home directory to a different location.
Diagnosis
The presence of this error can be confirmed through the build plan logs (Bamboo interface > Build Result > Logs), which will display the following message:
1
error: object directory <bamboo-home>/local-working-dir/_git-repositories-cache/<...>/.git/objects does not exist;
Cause
The issue traces back to the .git folder that is created every time Bamboo clones a repository. This folder contained references to the old Bamboo home location, resulting in the error.
Solution
The issue can be resolved by enabling the Clean working directory after each build option that can be found in plan configuration > Actions button > Configure plan > Other tab. This prompts Bamboo to delete all the content inside the <
build-working-directory>
and restart all git commands from scratch.
We recommend applying this solution to all the plans that contains the error.
Was this helpful?