Gitolite ssh commands

ぃ、小莉子 提交于 2019-12-12 20:25:28

问题


I'm trying to get around with a running gitolite server. When running ssh git@host info I get the expected list of repositories. But when I try to run and other command e.g. ssh git@host help the server responds with bad command: help

Unfortunately the gitolite documentation didn't help with the troubleshooting :(

Any suggestions? Cheers.


回答1:


This is expected.

Based on how gitolite uses ssh (ie, using forced command), you will always get that error message for any command except:

  • git commands (clone, push, pull, ...)
  • gitolite commands explicitly defined and enabled within gitolite

There is no interactive ssh session authorized with Gitolite.
Any command is intercepted and run through the gitolite script.
If it isn't one of the defined and enabled commands... you will get a "bad command" every time.

In this specific case, the configuration of gitolite the OP was using did not have help as a defined and enabled command; per follow-up comments.



来源:https://stackoverflow.com/questions/11646217/gitolite-ssh-commands

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!