一、服务器yum -y install git
git init --bare test.gitcd test.gitpwd //打印当前目录,假设是:/home/root/git/test.gitgit remote add origin ssh://$USER@IP地址:端口号/$(pwd)二、另一端客户端电脑:git clone ssh://root@IP地址:端口号/home/root/git/test.git
@IP地址:端口号
/home/root/git/test.git