Checking out revision causes fatal: not a git repository (or any of the parent directories): .git

Stephen Reece April 4, 2022


We recently migrated Bamboo to a new server The version (8.0.4) stayed the same. We use Bitbucket 7.17.1 as our git repo. Bamboo runs as a Windows service using a domain user that is local admin on the VM. I've also manually set the service account to have Full Control over the working directory.

The working directory was changed to /workdir after migrating to give us a few more characters to avoid path length limits, and the Git version is 2.33.1. We downgraded from 2.35.1 in case there was an issue with that version.

When a plan runs, we see the following:

simple	04-Apr-2022 10:29:28	Starting task 'Checkout ProductDocs' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.checkout'
simple	04-Apr-2022 10:29:28	Checking out into F:\Bamboo_Builds\Bamboo-home\workdir\OPS-RAFVGCR-JOB1\ProductDocs
simple	04-Apr-2022 10:29:28	Updating source code to revision: 3ee3f01de05d1227d8e6cabca0adf3af8ed35b4c
simple	04-Apr-2022 10:29:28	Fetching 'refs/heads/master' from 'ssh://'.
simple	04-Apr-2022 10:29:28	Warning: Permanently added '[]:59799' (RSA) to the list of known hosts.
simple	04-Apr-2022 10:29:29	Checking out revision 3ee3f01de05d1227d8e6cabca0adf3af8ed35b4c.
simple	04-Apr-2022 10:29:29	fatal: not a git repository (or any of the parent directories): .git
error	04-Apr-2022 10:29:29	Checkout to revision 3ee3f01de05d1227d8e6cabca0adf3af8ed35b4c has failed.

This is happening on multiple repos, but not all. We have tried deleting the cache in Bamboo, stopping Bamboo, deleting the contents of the git cache in the working directory, and restarting Bamboo, adding the service account to the working directory and cache with full control, and downgrading the Git install in case that was causing an issue. 

Really not sure where to go from here. We have a ticket open, but maybe this will be faster?



1 answer

0 votes
Vincent B June 1, 2022

Hi Stephen, 

I have the same behavior on a specific build plan. Did you solve your problem?


Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events