Overview
I'm facing an issue while using gerrit-python-tools (gerrit-sync command) to sync a repo, and the error occurs here:
1253: git.push(origin, refspecs='meta/config:refs/meta/config')
Steps to reproduce
I reproduced the error by performing the steps that gerrit-python-tools execute:
First, create an empty git repo:
$ mkdir ~/test && cd ~/test
$ git init
Initialized empty Git repository in /home/user/test/.git/
Then, add the remote pointing to my downstream gerrit:
$ git remote add gerrit ssh://downstream-ci@localhost:29418/downstream-openstack-dev/project-config
Next, fetch meta/config namespace from gerrit:
$ git fetch gerrit refs/meta/config:refs/remotes/origin/meta/config
remote: Total 3 (delta 0), reused 3 (delta 0)
Unpacking objects: 100% (3/3), done.
From ssh://localhost:29418/downstream-openstack-dev/project-config
* [new ref] refs/meta/config -> origin/meta/config
Checkout and modify meta/config:
$ git checkout meta/config
Switched to a new branch 'meta/config'
$ echo "# Add a comment" >> project.config
$ git commit -a -m "test commit"
And finally, try to push the modified meta/config:
$ git push gerrit meta/config:refs/meta/config
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 314 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
error: unpack failed: error Missing unknown d02d50c467f01b3b17d2daa6b67c514a1f2bb8da
fatal: Unpack error, check server log
To ssh://downstream-ci@localhost:29418/downstream-openstack-dev/project-config
! [remote rejected] meta/config -> refs/meta/config (n/a (unpacker error))
error: failed to push some refs to 'ssh://downstream-ci@localhost:29418/downstream-openstack-dev/project-config
Question
What does error: unpack failed: error Missing unknown d02d50c467f01b3b17d2daa6b67c514a1f2bb8da mean?
How could I troubleshoot this issue?
Misc
I'm using following tools:
git version 1.8.3.1
Gerrit Code Review (2.12.7)