Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用 git 时,git ls-remote返回状态码128,而任何其他命令都可以正常工作(推/拉/克隆/等)。我的回购是用 gitolite 管理的。第一次尝试部署 Rails 应用程序时出现此错误。手动调用所述命令时,我得到如下标准错误:
git ls-remote
128
fatal: The remote end hung up unexpectedly
如果这是权限/公钥问题,我将无法向/从 repo 推送/拉取。为什么单个ls-remote命令失败?
ls-remote
我想到了。问题出在 repo 的地址中。我使用git://host/repo了地址而不是git@host:repo. 后者解决了这个问题。
git://host/repo
git@host:repo