git 执行 ls-remote 命令期间捕获的 EGit SSH 异常
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10580221/
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
EGit SSH Exception caught during execution of ls-remote command
提问by Beig
I set up a GIT Server in our internal network. I can push to it using git://...../ and with the option --enable=receive-pack
on the server.
我在我们的内部网络中设置了一个 GIT 服务器。我可以使用 git://...../ 和--enable=receive-pack
服务器上的选项推送到它。
But when I try to push via ssh using EGIT Eclipse plugin(ssh://username@ip_adress:22/project.git) I get the following error:
但是当我尝试使用 EGIT Eclipse 插件(ssh://username@ip_adress:22/project.git)通过 ssh 推送时,我收到以下错误:
Transport Error Cannot get remote repository refs.
Reason: Exception caught during execution of ls-remote command.
传输错误无法获取远程存储库引用。
原因:执行 ls-remote 命令期间捕获异常。
What might cause this and how do I solve it?
什么可能导致这种情况,我该如何解决?
采纳答案by ivan_pozdeev
git://
and ssh://
use different protocols (see EGit User_Guide#Git_URLs). So either use the former in EGit too or make sure ssh access works.
git://
并ssh://
使用不同的协议(参见EGit User_Guide#Git_URLs)。因此,要么在 EGit 中也使用前者,要么确保 ssh 访问有效。
回答by roberthernandez
This problem's usually caused by problems in authentication which can happen if you're not authenticating as the git user, if you're using gitolite as the git user but using a key that's used for another account, or any other of a number of issues in authentication. You can fix this by generating a new keypair, posting the new public key, and authenticating using the new private key and the git user.
这个问题通常是由身份验证问题引起的在认证中。您可以通过生成新的密钥对、发布新的公钥并使用新的私钥和 git 用户进行身份验证来解决此问题。
I posted more detailed instructions at git, gitolite error push(go there to avoid double posting/double editing.)
我在git、gitolite 错误推送上发布了更详细的说明(去那里避免双重发布/双重编辑。)