〜gitolite / .ssh/authorized_keysを次のような行で設定する必要があります
command="/home/gitolite/bin/gl-auth-command <USERNAME>",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa AAAA...KEY.HERE...ZZZZ== user@label
これに関連する情報を含むランダムなURL(ページの下部を参照)
http://www.geekgumbo.com/2011/10/18/ssh-and-the-gitolite-installation-part-2/
SSH要件に従って、〜gitolite / .ssh/authorized_keysの所有権を次のように変更してください。
chown gitolite: ~gitolite/.ssh/authorized_keys
chmod go-w ~gitolite/.ssh/authorized_keys
編集:「git」を「gitolite」システムユーザー名に変更する編集を反映します。
次のコマンドを使用して、クライアントからのアクセスをテストします。
ssh -l gitolite -i <file_id_rsa_foobar> -v -o PasswordAuthentication=no -T <host>
追加-バナーを取得するためにローカルシステムで-Tが必要なようです(言い訳の間違いで入力):
....
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/username/.ssh/id_rsa_foobar
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering DSA public key: /home/username/.ssh/id_dsa_foobar
debug1: Remote: Forced command: /home/gitolite/bin/gl-auth/command <username>
....
hello <username> this is gitolite vX.X.XX-g0123abcd running on git X.X.X
the gitolite config gives you the following access:
R W mydir/project1
....