转载请注明 http://blog.csdn.net/zywx2009
1. 生成当前用户的ssh-key并添加到服务器上
ssh-keygen
cat id_rsa.pub >> ~/.ssh/authorized_keys (不能破坏掉以前的)
2. 构建测试目录
root@ubuntu:/path/to/tmp/client/lkk22222# tree
.
├── bionic
│ └── 1.txt
└── bootable
└── 2.txt
//生成bionic对应的裸仓库
cd /root/test/s
root@ubuntu:~/test/s#git init --bare bionic.git
Initialized empty Git repository in /root/test/s/bionic.git/
//生成bootable对应的裸仓库
root@ubuntu:~/test/s# git init --bare bootable.git
Initialized empty Git repository in /root/test/s/bootable.git/