Forks cannot be synchronized in Bitbucket Datacenter due to "refs does not point to a valid object" error
プラットフォームについて: Data Center のみ。 - This article only applies to Atlassian apps on the Data Center プラットフォーム。
この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。 Server* 製品のサポートは 2024 年 2 月 15 日に終了しました。Server 製品を実行している場合は、 アトラシアン Server サポート終了 のお知らせにアクセスして、移行オプションを確認してください。
*Fisheye および Crucible は除く
要約
問題
During the automatic fork synchronization, the following appears in the atlassian-bitbucket.log:
WARN [ref-sync:thread-1] c.a.s.i.r.s.a.AutoRefSyncProcessor <fork project>/<fork repository>[<fork repository_id>]: Could not synchronize changes with <source project>/<source repository>[<source repository_id>]
com.atlassian.bitbucket.scm.CommandFailedException: '/usr/bin/git -c gc.auto=0 fetch --no-tags ../<source repository_id> refs/heads/feature/branch1:refs/heads/feature/branch1' exited with code 0 saying: error: refs/heads/feature/invalid_branch1 does not point to a valid object!
error: refs/heads/feature/invalid_branch1 does not point to a valid object!
error: refs/heads/feature/invalid_branch2 does not point to a valid object!
error: refs/heads/feature/invalid_branch3 does not point to a valid object!診断
診断ステップ
Run "git fsck" command on the repository. The utility will report a "invalid sha1 pointer" error for each line mentioned above.
原因
A git gc has been run on the source repository, which removed the references to the branches just from the source repository.
⚠️ Never run git gc directly on a repository, here are more details on why that's the case: How to perform manual garbage collection on a repository in Bitbucket Server.
ソリューション
ソリューション
Delete the forked repository and create the fork again.
この内容はお役に立ちましたか?