好的...这是交易。当我尝试将本地存储库推送到服务器上的裸存储库时,出现以下错误:
Counting objects: 225, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (220/220), done.
Writing objects: 100% (225/225), 391.31 KiB, done.
Total 225 (delta 25), reused 0 (delta 0)
git: 'index-pack' is not a git-command. See 'git --help'.
error: index-pack exited with error code 1
error: unpack failed: index-pack abnormal exit
To user@ipaddress:/home/user/public_html/dir.git
! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to 'user@ipaddress:/home/user/public_html/dir.git'
现在我只会在尝试推送较大的存储库时收到此错误消息。当我将单个文件最多推送三个文件存储库时,它可以完美运行。这是怎么回事?!?!
注意:我在共享网络主机上,但我可以通过 SSH 访问服务器。如果我遗漏了您需要的内容,请告诉我,我可以发布信息...
感谢您的帮助!
最佳答案
这意味着在远程机器上找不到 git-index-pack。它在你的道路上吗?尝试通过 ssh 命令运行它:
git --exec-path
换句话说,运行以下命令:
ssh user@hostname git --exec-path
看看是否可行。
关于git - 将本地仓库推送到共享主机上的裸服务器仓库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7408907/