'Object Directory Does Not Exist' Error in Build Logs After Migrating Bamboo Home Directory
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
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.
All Bamboo versions after transitioning the home directory to a different location.
The presence of this error can be confirmed through the build plan logs (Bamboo interface > Build Result > Logs), which will display the following message:
error: object directory <bamboo-home>/local-working-dir/_git-repositories-cache/<...>/.git/objects does not exist;
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.
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.