What happens when Repository Caching on Agents is enabled?

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

This article's purpose is to explain what happens when the Repository Caching on Agents option is enabled.

Solution

The option Repository Caching on Agents enables a cache of the git repository checkout on the agent side. If enabled, the source checkout task will first update the cache and then clone the repository from it, not directly from the remote.

After the "Enable repository caching on agents" is enabled, Bamboo will set the remote origin URL for the local copy to point to the cache folder:

i.e.:

1 remote.origin.url=file://Users/username/bamboo-agent-home/xml-data/build-dir/_git-repositories-cache/a8682f8f67bb59855199defc6cfd93bd62f109f1

If the Repository Caching on Agents is disabled, Bamboo will checkout the repository directly from the remote URL and set the remote origin to the actual repository URL:

i.e.:

1 remote.origin.url=ssh://git@bitbucket:7999/proj/repo.git
Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.