git ls-remote 在任何 repo 上返回 128
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6564309/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
git ls-remote returns 128 on any repo
提问by Eimantas
When using git, git ls-remote
returns status code 128
while any other commands work flawlessly (push/pull/clone/etc). My repos are being managed with gitolite. I'm getting this error when trying to deploy rails app for the first time. When invoking said command by hand I get standard error like this:
使用 git 时,git ls-remote
返回状态代码,128
而任何其他命令都可以正常工作(推/拉/克隆/等)。我的仓库是用 gitolite 管理的。第一次尝试部署 rails 应用程序时出现此错误。手动调用上述命令时,我得到如下标准错误:
fatal: The remote end hung up unexpectedly
If this was permissions/public key issue, I wouldn't be able to push/pull to/from the repo. Why does single ls-remote
command fail?
如果这是权限/公钥问题,我将无法推入/拉入/拉出回购。为什么单个ls-remote
命令失败?
回答by Eimantas
I figured it out. The problem was in repo's address. I have used git://host/repo
address instead of git@host:repo
. The latter fixed the issue.
我想到了。问题出在 repo 的地址上。我使用了git://host/repo
地址而不是git@host:repo
. 后者解决了这个问题。