I installed git and gitosis as described here in this guide Here are the steps I took:
Server: Gentoo
Client: MAC OS X
1) git install
emerge dev-util/git 2) gitosis install
cd ~/src git clone git://eagain.net/gitosis.git cd gitosis python setup.py install 3) added git user
adduser --system --shell /bin/sh --comment 'git version control' --no-user-group --home-dir /home/git git In /etc/shadow now:
git:!:14665:::::: 4) On local computer (Mac OS X) (local login is ipx, server login is expert)
ssh-keygen -t dsa got 2 files:
~/.ssh/id_dsa.pub ~/.ssh/id_dsa 5) Copied id_dsa.pub onto server
~/.ssh/id_dsa.pub Added content from file ~/.ssh/id_dsa.pub into file ~/.ssh/authorized_keys
cp ~/.ssh/id_dsa.pub /tmp/id_dsa.pub sudo -H -u git gitosis-init < /tmp/id_rsa.pub sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update 6) Added 2 params to /etc/ssh/sshd_config
RSAAuthentication yes PubkeyAuthentication yes Full sshd_config:
Protocol 2 RSAAuthentication yes PubkeyAuthentication yes PasswordAuthentication no UsePAM yes PrintMotd no PrintLastLog no Subsystem sftp /usr/lib64/misc/sftp-server 7) Local settings in file ~/.ssh/config:
Host myserver.com.ua User expert Port 22 IdentityFile ~/.ssh/id_dsa 8) Tested:
ssh [email protected] Done!
9) Next step. There I have problem
git clone [email protected]:gitosis-admin.git cd gitosis-admin SSH asked password for user git. Why ssh should allow me to login as user git? The git user doesn't have a password. The ssh key I created is for the user expert. How this should work?
Do I have to add some params to sshd_config?