我正在尝试将本地存储库部署到远程目录。我已经git init --bare
在这个远程目录中运行,并将正确的 ssh 路径添加到我的本地 git repo 分支(名为 dev)git remote add server ssh://user@domain.com:2222/path/to/repo
。
当我运行时,git push server dev
我得到以下输出:
Counting objects: 44, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (37/37), done.
Writing objects: 100% (44/44), 89.58 KiB, done.
Total 44 (delta 2), reused 27 (delta 2)
error: Could not read 551dd5c5d67e3b2da4074d8f15a59a324a063a03
fatal: Failed to traverse parents of commit 0615b940c3247e3547de1379ab09a4a6bb614252
error: Could not read 551dd5c5d67e3b2da4074d8f15a59a324a063a03
fatal: Failed to traverse parents of commit 0615b940c3247e3547de1379ab09a4a6bb614252
To ssh://user@domain.com:2222/path/to/repo
! [remote rejected] dev -> master (missing necessary objects)
error: failed to push some refs to 'ssh://user@domain.com:2222/path/to/repo'
我不确定这里发生了什么。