yum install git
mkdir /var/git cd /var/git mkdir play.git cd play.git git --bare init Initialized empty Git repository in /var/git/test.git/
git clone root@110.111.120.119:/var/git/test.git
收集全部须要登陆的用户的公钥,就是他们本身的id_rsa.pub文件,把全部公钥导入到/home/git/.ssh/authorized_keys文件里,一行一个
ssh-keygen -t rsa cat .ssh/id_rsa.pub
建立一个空的仓库后,git pull/push 报错,报错信息以下Your configuration specifies to merge with the ref 'refs/heads/master' from the remote, but no such ref was fetched.
这是正常的,在本地目录添加一个文件,commit 后 push 便可。git