Windows Bamboo fail to detect changes from SSH Git repository

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

Problem

Bamboo fail to detect changes from SSH Git repository.

The following appears in the atlassian-bamboo.log

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2017-02-18 22:50:39,112 INFO [11-BranchDetectionBackgroundThread:pool-19-thread-1] [DefaultErrorHandler] Recording an error: Repository error while detecting branches for plan PROJ-PLAN. com.atlassian.bamboo.plugins.git.GitCommandException: command D:\ProgramFiles\Git\cmd\git.exe ls-remote ssh://d5d7963a-4992-446f-b4f8-02833adbc8f1@127.0.0.1:60245/proj/repo.git failed with code 128. Working directory was [D:\ProgramFiles\Atlassian\ApplicationData\bamboo-home\xml-data\build-dir]., stderr: 1 [main] ssh 4276 D:\ProgramFiles\Git\usr\bin\ssh.exe: *** fatal error - add_item ("\??\D:\ProgramFiles\Git", "/", ...) failed, errno 1 Stack trace: Frame Function Args 000FFFF9BB0 0018005C24E (0018023F612, 0018021CC39, 000FFFF9BB0, 000FFFF8B30) 000FFFF9BB0 001800464B9 (000FFFFABDE, 000FFFF9BB0, 1D28A3102147699, 00000000000) 000FFFF9BB0 001800464F2 (000FFFF9BB0, 00000000001, 000FFFF9BB0, 505C3A445C3F3F5C) 000FFFF9BB0 001800CAA8B (00000000000, 000FFFFCE00, 001800BA558, 1D28A310B055E99) 000FFFFCC00 00180118745 (00000000000, 00000000000, 001800B2C5E, 00000000000) 000FFFFCCC0 00180046AE5 (00000000000, 00000000000, 00000000000, 00000000000) 00000000000 00180045753 (00000000000, 00000000000, 00000000000, 00000000000) 000FFFFFFF0 00180045804 (00000000000, 00000000000, 00000000000, 00000000000) End of stack trace fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

Cause

It might be a bug in Git for Windows.

Workaround

Upgrade to the latest Git for Windows

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.