REPO的安装和配置

REPO的安装和配置,第1张

1. REPO的安装

① 根目录下创建bin文件夹

② 配置环境变量PATH=~/bin:$PATH

③ 下载repo脚本git clone https://gerrit-googlesource.lug.ustc.edu.cn/git-repo 或者采用 git clone git@scm-gitlab:common/repo.git (建议采用这个库) 或者通过 gitee 链接下载 https://gitee.com/linlinlinliln/repo/releases

④将下载的git-repo文件夹中的repo文件复制到bin下(如果用绝对路径就直接用git-repo的repo),并且修改权限chmod a+x ~/bin/repo
如果是直接用下载下来的chmod a+x ~/bin/repo/repo
(PS: 这里有个问题需要注意: 在一些版本的repo , 不能直接用拷贝出来的repo ,无法链接)

⑤ 修改repo文件中的谷歌源为清华源,即将REPO_URL = ‘https://gerrit.googlesource.com/git-repo’ 。(按照实际的项目需求)
以及python 的 版本需求

例如
URL

Python支持的最小版本

2. 下载代码

1)在用户目录下新建一个文件夹

2)进入后通过绝对路径进行下载: (主要是这里出问题)
例如:
~/bin/repo/repo init -u git@xxx-gitlab:xxxx/manifest.git -m xxx02/06xxxx.xml
~/bin/repo/repo sync -j8

3. repo遇到的一些坑

1)Repo 要跟对应的python版本对应 (否则下载过程会遇到 类似main.py的一些语法错误问题)
https://blog.csdn.net/sinat_16643223/article/details/116330570

2) Repo的权限问题
http://www.javashuo.com/article/p-xvncrcnf-mx.html

3)Repo 建议用绝对路径 init -u 和 sync


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/715242.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-25
下一篇 2022-04-25

发表评论

登录后才能评论

评论列表(0条)

保存