Here are some hints for installing Gitosis on a Debian or Ubuntu box.
Allow access to gitosis via ssh
After you apt-get install gitosis, you’ll want to
addgroup gitosis ssh
If you have ssh listening on a non-standard port, place the following in ~/.ssh/config on the client side:
Host gitosis.example.com Port 2512
A lot of the examples for gitosis specify the user as ‘git’. The Debian package uses ‘gitosis’ as the username. You’ll want to s/git\@/gitosis\@/g those examples.