http://blog.chinaunix.net/uid-26990529-id-3396947.html
获取repo工具
curl http://android.git.kernel.org/repo > ~/bin/repo
chmod a+x ~/bin/repo
获取正版的目录树
mkdir myandroid
cd myandroid
repo init --repo-url=git://github.com/MIPS/repo.git --repo-branch=stable -u git://github.com/MIPS/manifests.git -b mips-froyo-r9 --mirror
repo sync -j18
建立自己的仓库
cd /var/lib/git
mkdir mipsandroid-xinzhen
cd mipsandroid-xinzhen
repo init --repo-url=file:///home/xinzhen/myandroid/repo.git --repo-branch=stable -u file:///home/xinzhen/myandroid/manifests.git -b mips-froyo-r9 --mirror
repo sync
注:/var/lib/git是git-daemon 的 base-path
修改配置文件 /var/lib/git/mipsandroid-xinzhen/manifests.git/config
[daemon]
uploadpack=true
uploadarch=true
receivepack=true
修改 manifests 使之使用我们自己的路径
cd /tmp/
git clone git://192.168.1.51/mipsandroid-xinzhen/manifests.git
cd manifests/
vim default.xml
fetch="git://github.com/MIPS/" />改为fetch="git://192.168.1.51/mipsandroid-xinzhen" />
试试看从另一台电脑访问这个 repo 仓库:
repo init --repo-url=git://192.168.1.51/mipsandroid-xinzhen/repo.git --repo-branch=stable -u git://192.168.1.51/mipsandroid-xinzhen/manifests.git -b mips-froyo-r9
repo sync -j5