git migration error: [remote rejected] master -> master (cannot combine normal pushes and magic pushes)
I would like to migrate a repo from server-A to server-B, here is my procedure:
git clone --mirrora repo, named test from server-A
$ git clone --mirror ssh://my.name@10.58.65.50:29418/test Cloning into bare repository 'test.git'... remote: Counting objects: 1836, done remote: Finding sources: 100% (1829/1829) remote: Total 2758 (delta 377), reused 2664 (delta 377) Receiving objects: 100% (2758/2758), 1.28 MiB | 0 bytes/s, done. Resolving deltas: 100% (949/949), done. Checking connectivity... done.
Create an empty repo (test) on server-B
git push --mirrorthe repo (test) to server-B git push was failed, and the error log is listed as below:
$ git push --mirror ssh://my.name@10.58.65.51:29418/test Counting objects: 2661, done. Delta compression using up to 4 threads. Compressing objects: 100% (1713/1713), done. Writing objects: 100% (2661/2661), 1.25 MiB | 0 bytes/s, done. Total 2661 (delta 921), reused 2661 (delta 921) remote: Resolving deltas: 100% (921/921) remote: Processing changes: refs: 352, done To ssh://my.name@10.58.65.51:29418/test ! [remote rejected] master -> master (cannot combine normal pushes and magic pushes) ! [remote rejected] refs/meta/config -> refs/meta/config (cannot combine normal pushes and magic pushes) ! [remote rejected] refs/changes/00/12100/1 -> refs/changes/00/12100/1 (cannot combine normal pushes and magic pushes) error: failed to push some refs to 'ssh://my.name@10.58.65.51:29418/test'
I have no idea of this error and how could I solve that?
Thanks!