[root@localhost home]# id git id: git:无此用户 [root@localhost home]# useradd git [root@localhost home]# passwd git
[root@localhost home]# mkdir -p data/git/gittest.git [root@localhost home]# git init --bare data/git/gittest.git [root@localhost home]# cd data/git/ [root@localhost git]# chown -R git:git gittest.git/
[root@localhost gittest]# git clone ssh://git@192.168.150.163/data/git/gittest.git/
端口如果不是22
[root@localhost gittest]# git clone ssh://git@192.168.150.163:2994/data/git/gittest.git/
git@192.168.150.163‘s password: git用户密码
原文:https://www.cnblogs.com/charon2/p/10522256.html