julley 发表于 2018-9-18 06:41:40

centos6 git搭建

  1,安装openssh服务断和客户端
  yum -y install openssh*
  2,安装git和python-setuptools
  yum -y install git python-setuptools
  3,获取并安装gitosis,来管理git仓库
  git clone https://github.com/res0nat0r/gitosis.git
  cd gitosis
  python setup.py   install
  4,生成公钥,这里为本机为客户端,并把公钥复制到/tmp下
  ssh-keygen
  cp ~/.ssh/id_rsa.pub /tmp
  5,配置gitosis
  useradd git
  sudo   -H -u git gitosis-init > /home/git/.ssh/authorized_keys //将root公钥导入
  chmod 600 /home/git/.ssh/authorized_keys   //权限一定要改成600,要不就提醒权限过高
  7,管理git配置,“下载”成功就代表你的git成了
  git clone git@127.0.0.1:/gitosis-admin.git

页: [1]
查看完整版本: centos6 git搭建