Bitbucket での Git LFS のトラブルシューティング

お困りですか?

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

コミュニティに質問

このページでは、Bitbucket で Git LFS を使用する際に発生する可能性がある問題のトラブルシューティング方法について説明します。

General Git LFS issues

Have you installed the Git LFS client on your local machine?

Each person who works with the repository has to have the Git LFS client installed on their local machine.

See Use Git LFS with Bitbucket for instructions.

Has Git LFS file tracking been set up, and has the .gitattributes file been pushed to the repo?

The repository needs to have file tracking set up, and the updated .gitattributes file should have been pushed to the repo.

そのリポジトリで以降に作業するユーザーのリポジトリのローカル クローンには、この .gitattributes ファイルが含まれます。

See Use Git LFS with Bitbucket for instructions.

Have you checked that you have enough storage in your Bitbucket account?

Bitbucket では、アカウントのストレージ制限が超過されている場合、LFS ファイルのリポジトリへのプッシュが制限されます。

You can check the current storage used by your account by choosing Personal settings > Git LFS from the avatar menu in Bitbucket.

See Storage policy for Git LFS with Bitbucket for details.

Git LFS での個別のエラーについて

Git LFS ファイルが見つからない

The LFS pointer file exists in the repo, but the target file in the remote store can't be found. A File missing error will be returned, letting you know that your file may not have been uploaded correctly.

ターミナルでは次のような 404 メッセージが表示される場合があります。

Git LFS: (0 of 1 files, 1 skipped) 0 B / 1024 B, 1024 B skipped                                  
[404] Object does not exist on the server
[ee62792aacdfe08a6f5437...8dc4eb6973d86c74c1a273] Object does not exist on the server

考えられる原因

実行可能な対応策

ファイル ストレージのサーバーがダウンしている

後でもう一度試行します。

ファイルが適切にアップロードされなかった。これは、ファイルをアップロードしたときに Git LFS が適切に構成されていなかったときに発生する場合があります。

元のファイルにアクセス可能な場合、再度アップロードを試みます。たとえば、data.bin のリストアは次のように行います。

$ cp <source> data.bin
$ git add data.bin
$ git lfs push <remote> <branch> --all
$ git checkout data.bin

元のファイルにアクセスできない場合、ユーザー側で対応することはできません。

Git LFS ファイルを Bitbucket にプッシュするときのエラー

Pushing a large Git LFS file to Bitbucket.org times out and fails.

ターミナルでは次のようなメッセージが表示される場合があります。

Git LFS: (0 of 1 files) 1.60 GB / 1.60 GB
http: Put https://media-api.atlassian.io/upload/7cd73528-28e4-4c45-92a5-e6ddbf52a75e/binary?hashAlgorithm=sha2...: EOF
error: failed to push some refs to 'git@bitbucket.org:account/some_repo.git'

考えられる原因

実行可能な対応策

特に大容量のファイル (複数ギガバイトのサイズ) をプッシュしてタイム アウトが発生している。

Try increasing the LFS time limit with the following command:

$ git config lfs.activitytimeout 60

SSH を使用して巨大なファイルや多数のファイルを Git LFS にプッシュするときのエラー

SSH を使用して巨大なファイルや多数のファイルを Git LFS にプッシュすると、タイム アウトが発生して失敗する。

ターミナルでは次のようなメッセージが表示される場合があります。

Git LFS: (0 of 1 files) 1.60 GB / 1.60 GB
http: Put https://media-api.atlassian.io/upload/7cd73528-28e4-4c45-92a5-e6ddbf52a75e/binary?hashAlgorithm=sha2...: EOF
error: failed to push some refs to 'git@bitbucket.org:account/some_repo.git'

考えられる原因

実行可能な対応策

SSH でのタイム アウトとプッシュの失敗

  1. Instead of pushing very large or very many files to Git LFS using SSH, you can try to push them with HTTPS. Generally, we recommend using HTTPS when pushing large or lots of Git LFS files.
  2. You can also try increasing the overall LFS time limit with:

    $ git config lfs.activitytimeout 60
最終更新日 2022 年 9 月 26 日

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

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