搭建git服务器和使用教程
1.sudo yum install git 安装git2.sudo useradd git 添加git用户
3.导入开发者自己的登录用户公钥,就是.ssh/下的id_rsa.pub文件
公钥导入到/home/git/.ssh/authorized_keys文件里,一行一个。
如果没有id_rsa.pub,输入命令ssh-keygen-trsa生成id_rsa,id_rsa.pub。
4.sudo git init --bare test.git 在/home/git/下初始化一个空的git仓库
5.git:x:502:502::/home/git:/usr/bin/git-shell 创建git用户不允许登录。
6.git clone git@server:/home/git/test.git
Cloning into 'test'...
warning: You appear to have cloned an empty repository.
页:
[1]