配置gitosis for mac osx and ubuntu

 Client side                                               |       server side


1.Create "git" accout

Mac

             Finder/System preferences/User and Groups/

Linux: 

     $ sudo useradd -s /bin/bash -mr git 

     $ sudo adduser git sudo

     $ sudo passwd git

    

2.Download and setup gitolite

Mac & Linux:

     $ git clone git://github.com/ossxp-com/gitolite.git

     $ cd gitolite/src

     $ ./gl-easy-install git server admin

3. Generate ssh key and copy .pub to git account

$ ssh-keygen -t rsa

$ scp ~/.ssh/id_rsa.pub git@ip:~


              4. Init gitosis using step3 ssh pub key

$ sudo -H -u git gitosis-init < /tmp/yourname.pub

$ cd ~/.ssh

$delete "command="gitosis-serve yourname",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty " in authorized_keys file

$ sudo chmod 755 /Users/git/repositories/gitosis-admin.git/hooks/post-update (mac)


5 set the git path to PATH env

$ touch ~/.bashrc

$ echo PATH=/usr/local/bin:/usr/local/git/bin:\$PATH > .bashrc

$ echo export PATH >> .bashrc

6. Manage gitosis 

      $ git clone git@192.168.1.100:repositories/gitosis-admin.git

      $ add user in keydir and project member's in gitosis.conf







评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值