fatal: unknown capability 'object-format=sha1' error is reported for Git operations

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

Git operations, such as clones, fetches and pushes fail.

The Git client receives a 500 error, similar to the following while performing a Git operation:

1 error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500 fatal: expected flush after ref listing

On the server side, one or more Bitbucket nodes have the following error in the atlassian-bitbucket.log file:

1 2 The following was written to stderr: fatal: unknown capability 'object-format=sha1'

This error indicates that the Git version installed on that particular node does not recognize the object-format capability used in a repository.

The object-format capability, which was introduced in Git 2.28.0, specifies the supported hash algorithm for naming content in Git repositories. (Reference: Git 2.28.0 Protocol Capabilities)

This error suggests that there's a mismatch in the Git versions installed on the Bitbucket Data Center cluster nodes.

Some nodes have Git versions >= 2.28.0 installed that support the object-format capability while others have Git versions < 2.28.0, which do not support it.

Environment

  • Bitbucket Data Center instances with more than one node

  • Nodes do not have the same Git versions installed

Diagnosis

One or more Bitbucket Data Center nodes report fatal: unknown capability 'object-format=sha1' errors in the atlassian-bitbucket.log file.

Sample error:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2022-11-02 00:30:49,882 ERROR [http-scmrequest-handler:thread-68] user1 *TCR1VKx30x2004429x3 10.220.118.157,10.100.104.148 "POST /scm/project1/repo1.git/git-upload-pack HTTP/1.1" c.a.s.i.s.g.p.h.GitSmartExitHandler PROJECT1/repo1[999]: Read request from 10.220.111.123 failed The following was written to stderr: fatal: unknown capability 'object-format=sha1' com.atlassian.utils.process.ProcessException: Non-zero exit code: 1 at com.atlassian.bitbucket.internal.process.nu.NioNuProcessHandler.callExitHandler(NioNuProcessHandler.java:332) at com.atlassian.bitbucket.internal.process.nu.NioNuProcessHandler.finish(NioNuProcessHandler.java:381) at com.atlassian.bitbucket.internal.process.nu.NioNuProcessHandler.onExit(NioNuProcessHandler.java:136) at com.zaxxer.nuprocess.internal.BasePosixProcess.onExit(BasePosixProcess.java:317) at com.zaxxer.nuprocess.linux.ProcessEpoll.handleExit(ProcessEpoll.java:356) at com.zaxxer.nuprocess.linux.ProcessEpoll.checkDeadPool(ProcessEpoll.java:344) at com.zaxxer.nuprocess.linux.ProcessEpoll.process(ProcessEpoll.java:274) at com.zaxxer.nuprocess.internal.BaseEventProcessor.run(BaseEventProcessor.java:86) at com.zaxxer.nuprocess.linux.ProcessEpoll.run(ProcessEpoll.java:163) at com.zaxxer.nuprocess.linux.LinuxProcess.run(LinuxProcess.java:111) at com.zaxxer.nuprocess.linux.LinProcessFactory.runProcess(LinProcessFactory.java:50) at com.zaxxer.nuprocess.NuProcessBuilder.run(NuProcessBuilder.java:275) at com.atlassian.bitbucket.internal.process.nu.NuNioProcessHelper.run(NuNioProcessHelper.java:76) at com.atlassian.bitbucket.internal.process.NioCommand.call(NioCommand.java:46) at com.atlassian.stash.internal.scm.git.protocol.http.GitSmartRequest.handleRequest(GitSmartRequest.java:80) at com.atlassian.stash.internal.scm.git.protocol.http.HttpUploadPack.handleRequest(HttpUploadPack.java:82) at com.atlassian.stash.internal.scm.ThrottledScmRequestFactory$AbstractThrottledScmRequest.handleRequest(ThrottledScmRequestFactory.java:56) at com.atlassian.stash.internal.scm.DefaultHttpScmRequestExecutor.runSync(DefaultHttpScmRequestExecutor.java:174) at com.atlassian.stash.internal.scm.DefaultHttpScmRequestExecutor.access$200(DefaultHttpScmRequestExecutor.java:49) at com.atlassian.stash.internal.scm.DefaultHttpScmRequestExecutor$ScmAsyncRequest.run(DefaultHttpScmRequestExecutor.java:366) at com.atlassian.stash.internal.request.DefaultRequestManager.lambda$wrapForAsync$0(DefaultRequestManager.java:169) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.lang.Thread.run(Thread.java:748) ... 1 frame trimmed

Solution

Check the Git versions installed on the cluster nodes and ensure that they all use the same version.

Upgrade Git on the nodes that still have version < 2.28.0 to match the Git version on other nodes.

Check the Bitbucket Supported Platforms page for the Git versions that are supported for your Bitbucket version:

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.