关闭

配置gitosis for mac osx and ubuntu

643人阅读 评论(0) 收藏 举报
分类:

 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







0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:16849次
    • 积分:313
    • 等级:
    • 排名:千里之外
    • 原创:12篇
    • 转载:10篇
    • 译文:0篇
    • 评论:0条
    文章存档