Push is failing with "failed to read objects <object_id>: Permission Denied" error in Bitbucket Data Center
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
要約
While trying to perform the push to the Bitbucket Data Center repository, it is failing with the following error: "failed to read objects <object_id>: Permission Denied"
環境
Bitbucket Data Center 7.21.6
Is applicable to Bitbucket Data Center 8.x
診断
Run the following command on the Bitbucket server machine under the Repository path or location. The Repository path or location, you can find from Bitbucket UI → Select Repository → Repository Settings → Location path.
a. git fsck --no-dangling
b. git fsck --full
原因
This issue generally occurs due to permission or ownership issues of the objects (highlighted in the error message) present on the Bitbucket server repository path for the user.
For example, The object should be owned by bitbucket_user (the user with which Bitbucket service runs, by default, it is atlbitbucket user). However, it may be owned by root user causing permission denied errors.
ソリューション
The issue should be resolved after correcting the ownership of the user and group of objects or permissions of objects on the Bitbucket server machine.