pre-1.7.4 ( 1.7.10), script git -shell:
#!/bin/bash
cmdline=($1)
cmd=$(basename "${cmdline[0]}")
if [ -z "$cmd" ] ; then
exec git-shell
elif [ -n "$cmd" -a -x ~/git-shell-commands/"$cmd" ] ; then
~/git-shell-commands/"$cmd" "${cmdline[@]:1}"
else
exec git-shell -c "$1"
fi
"git -shell", script, "-c" script.
git -shell, script . :
#!/bin/bash
cmd=$(basename $1)
if [ -z "$cmd" ] ; then
exec git-shell
elif [ -n "$cmd" -a -x ~/git-shell-commands/"$cmd" ] ; then
shift
~/git-shell-commands/"$cmd" "$@"
else
exec git-shell -c "$*"
fi
, authorize_keys :
command="sshsh $SSH_ORIGINAL_COMMAND" ...
, script pre-1.7.4 ( ": , ?"? git - shell), 1.7.4 .
: . . , ~/ git -shell- ( git -shell 1.7.4 , - ).