1.useradd git
2.cd git mkdir project.git cd project.git
3.git init --bare
4.vi config 添加 denyCurrentBranch = ignore
5.ssh-keygen -t rsa
6. ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
7.ssh-add
8.git remote add origin [email protected]:/home/git/project.git
时间: 2024-10-08 14:05:04