linux环境如何配置repo

配置Gerrit与Repo工具

(1)下载repo

       mkdir ~/bin
       curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > ~/bin/repo
       chmod a+x ~/bin/repo

(2)配置环境变量(在/etc/profile 或者~/.bashrc中添加如下,添加完成后执行source /etc/profile或者source ~/.bashrc使配置生效)

       export PATH=~/bin:$PATH
       export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'

(3)配置本地gerrit,添加自己的信息(修改~/.gitconfig)

       [user]
            email = anl@hpplay.cn # 修改为你自己的信息
            name = anl # 修改为你自己的信息
      [core]
          editor = vi
      [color]
          ui = auto
      [url "ssh://anl@192.168.8.2:29418/"] # 修改为你自己的gerrit的下载链接信息
           insteadOf = "gerrit:"

(4)下载代码

        repo init -u gerrit:test/manifest -b 分支名
        repo sync -j4
        repo start --all 分支名

 

 

转载于:https://www.cnblogs.com/zndxall/p/10007755.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值