自建 Android 源码 git/repo 仓库

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





    • 0
      点赞
    • 0
      收藏
      觉得还不错? 一键收藏
    • 0
      评论

    “相关推荐”对你有帮助么?

    • 非常没帮助
    • 没帮助
    • 一般
    • 有帮助
    • 非常有帮助
    提交
    评论
    添加红包

    请填写红包祝福语或标题

    红包个数最小为10个

    红包金额最低5元

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

    抵扣说明:

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

    余额充值