На сервере установил и настроил gitolite. Используя ключ администратора клонировал gitolite-admin.git и добавил ключ нового пользователя, отправил изменения на сервер.
Код: Выделить всё
$ ssh gitolite@gitolite info
hello gitolite, this is gitolite@develop running gitolite3 v3.03-0-g75387fd on git 1.7.10
R W gitolite-admin
R W testing
Так как все действия производятся с одной машины, то в .ssh/config внёс следующее:
Код: Выделить всё
Host gitolite
IdentityFile ~/.ssh/id_rsa.gitolite
User gitolite
Hostname 192.168.10.244
Host test
IdentityFile ~/.ssh/test_git
User test_git
Hostname 192.168.10.244
Пробую новым пользователем клонировать репозиторий testing:
Код: Выделить всё
$ git clone test_git@test:testing.git
Cloning into 'testing'...
test_git@192.168.10.244's password:
В логах сервера:
Код: Выделить всё
May 25 10:15:25 develop sshd[1717]: Accepted publickey for gitolite from 192.168.10.42 port 52195 ssh2
May 25 10:15:25 develop sshd[1717]: pam_unix(sshd:session): session opened for user gitolite by (uid=0)
May 25 10:15:25 develop sshd[1720]: Received disconnect from 192.168.10.42: 11: disconnected by user
May 25 10:15:25 develop sshd[1717]: pam_unix(sshd:session): session closed for user gitolite
May 25 10:18:31 develop sshd[1733]: Invalid user test_git from 192.168.10.42
May 25 10:18:31 develop sshd[1733]: Failed none for invalid user test_git from 192.168.10.42 port 52196 ssh2
Судя по описанию, все действия должны происходить от имени пользователя gitolite, но почему-то этого не происходит?
/etc/ssh/sshd_config
Код: Выделить всё
Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 768
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 120
PermitRootLogin no
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
PasswordAuthentication yes
X11Forwarding no
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yes
AllowUsers gitolite
Можете подсказать в чём ошибка?
Спасибо!