git upload-archive archiver died with error

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When using 'git archive' from a remote machine to Bitbucket Server 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

Cause

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.

Resolution

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

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.