Question

I'm setting up a git server (on a RHEL 6 box).

I have created the git user and set its shell to /usr/bin/git-shell I have created a directory git-shell-commands in the user's home (/home/git) and chmod it to 755.

I downloaded the help and list commands from github, put them in git-shell-commands and made them executable.

I also set up the .ssh directory and authorized_keys.

Now on my box when I do ssh git@thegitserver I get the error

Last login: Thu Jun 13 11:56:07 2013 from 192.168.1.2
fatal: What do you think I am? A shell?
Connection to 192.168.1.3 closed.

What else is there to do to make it interactive?

Était-ce utile?

La solution

So this is a git version issue. The version that comes with RHEL 6 (1.7.1) is too old to properly work with the git-shell-commands directory. Upgrading to 1.8 solved this.

Autres conseils

The man page of git-shell describes exactly this case. You need to create a directory called ~/git-shell-commands. In this directory you put files with the commands you want to use.

Why do you want to do this anyways? If you want to setup a git server, gitolite is the best solution I know.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top