anongitssh —
restricted shell for git-upload-pack
over SSH
anongitssh |
-c git-upload-pack
repodir |
The anongitssh utility is a restricted
shell which invokes
git-upload-pack(1) utility included in the
git(1) suite. It is designed to be a non-interactive login
shell of a user on the system which accepts read-only remote access via SSH
protocol.
The anongitssh has a database of login
names,
git(1) repository prefixes, and
chroot(8) directories which is configurable at compile time.
When the anongitssh is invoked as a login shell, it
will check validity of the login name and the uid using the database, do
chroot(8) to the directory specified in the database, prepend
a prefix to the pathname specified in repodir, and
finally invoke
git-upload-pack
with the complete pathname for the repository.
All of the option flags passed from the client and environment
variables will be removed. When an invalid access is detected, a predefined
message will be sent to the client.
The anongitssh records all of the access
via
syslog(3) API.