git upload-archive archiver died with error

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

このページの内容

お困りですか?

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

コミュニティに質問

症状

When using 'git archive' from a remote machine to Stash as shown below only works with tags or HEAD, but not the commit id.

$ git archive -o testing.tar --remote=ssh://git@<server>:7999/<project>/testing.git --format=tar 3a8de704c0da882cf8ddc1fecda4621062c48870
fatal: sent error to the client: git upload-archive: archiver died with error
remote: fatal: no such ref: 3a8de704c0da882cf8ddc1fecda4621062c48870
remote: git upload-archive: archiver died with error

原因

According to Git 1.7.8.1 release notes:

"git archive" mistakenly allowed remote clients to ask for commits that are not at the tip of any ref.

ソリューション

This is an expected behaviour for the newest versions of Git.  Remote Git repositories do not allow clients to access arbitrary SHA1s. The requested objects should be accessed by a ref (i.e. file name).

Last modified on Mar 30, 2016

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

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