问题
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.
But when I try to push via ssh using EGIT Eclipse plugin(ssh://username@ip_adress:22/project.git) I get the following error:
Transport Error Cannot get remote repository refs.
Reason: Exception caught during execution of ls-remote command.
What might cause this and how do I solve it?
回答1:
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.
回答2:
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.
I posted more detailed instructions at git, gitolite error push (go there to avoid double posting/double editing.)
来源:https://stackoverflow.com/questions/10580221/egit-ssh-exception-caught-during-execution-of-ls-remote-command