linux环境如何配置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 分支名

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM