I'm building my own git server on centos, I have done all these steps:
I add a new user named git and it's home is /home/git
and then I use ssh-keygen -t rsa to generate the .ssh
then I edit the /etc/ssh/sshd_config file to open the pub_key authorization :
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
then I git init --base in /srv/remote.git
finally I generate the id_rsa.pub on my client and copy it to my git server: /home/git/.ssh/authorized_keys
but when I git clone the repository : git@ip:/srv/remote.git
it always asks me to enter password, so why?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…