Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-21719

GIT checkout failing on Windows remote agent with error: "fatal not a GIT repository"

    XMLWordPrintable

Details

    Description

      Issue Summary

      A lot of customers have complained of build failures on Windows remote agents because of source code checkout tasks failing because of "fatal:not a git repository" error. 

      The error seems to relate to Bamboo not being able to checkout GIT repositories because of an incorrect cache, Bamboo tries to clean the cache folder and this process runs in loops and finally, the checkout fails.

      Below error is seen in the logs :

      Checking out into C:\Users\bamboo\bamboo-agent-home\xml-data\build-dir\PRO-PLAN\test-dir
      Updating source code to revision: 454a465b94d58c0bfecaccea70897ace5cbd29a9
      Fetching 'refs/heads/master' from 'ssh://git@10.10.2.2:7999/bam/test-repo.git'.
      fatal: not a git repository (or any of the parent directories): .git
      Cannot fetch branch 'refs/heads/master' from 'ssh://git@10.10.2.2:7999/bam/test-repo.git' to source directory 
      

      Steps to Reproduce

      Run the build on a Windows remote agent with a corrupted cache.

      Expected Results

      Build should succeed

      Actual Results

      Build fails with error "fatal : not a git repository"

      Workaround

      • Post clearing the cache, please rerun the build.
      • After clearing the cache if the same error is seen again, please disable repository caching on the remote agent by going to Overview >> Linked Repositories >> Select a repository and click on Advanced options and uncheck the option for "Enable repository caching on agents".

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              4f38d6bf51c0 Shashank Kumar
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: