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