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

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

要約

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:

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:

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.

環境

  • Bitbucket Data Center instances with more than one node
  • Nodes do not have the same Git versions installed

診断

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

Sample error:

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

ソリューション

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:



最終更新日: 2023 年 1 月 13 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.