现在的位置: 首页 > 综合 > 正文

Linux – Build repo/git server

2013年04月19日 ⁄ 综合 ⁄ 共 781字 ⁄ 字号 评论关闭

1. sudo apt-get install git-daemon-run

 

2. cat /etc/sv/git-daemon/run

 

1. Install git-daemon-run in addition to git-core
2. Edit /etc/sv/git-daemon/run to look as follows:

    #!/bin/sh
    exec 2>&1
    echo 'git-daemon starting.'
    exec chpst -ugit:git /
      /usr/lib/git-core/git-daemon /
      --reuseaddr /
      --syslog /
      --verbose /
      --base-path=/home/git/repositories /
      /home/git/repositories

3. Restart git-daemon-run

    sv restart git-daemon

 

 

3. make mirror

 

$ mkdir /pub/gittrees/android-mirror/   
$ chown git.git /pub/gittrees/android-mirror/        
$ cd /pub/gittrees/android-mirror/   
$ repo init -u git://android.git.kernel.org/platform/manifest.git --mirror   
$ repo sync

 

/pub/gittrees is the folder that direct to git database path.

 

 

 

抱歉!评论已关闭.