repo 踩坑记录

windows 安装repo

前置条件

1、git for windows 安装好。
2、python3安装好,并配置到环境变量

下载最新的repo工具

repo命令安装

mkdir ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+rx ~/bin/repo

repo工具安装

mkdir ~/repo
cd ~/repo
git clone https://gerrit-googlesource.lug.ustc.edu.cn/git-repo

workspace 搭建

mkdir ~/workspace
cd ~/workspace
mkdir .repo;cd .repo
cp ~/repo/git-repo repo -rf; cd ..
repo init -u git@xxx:xxx.git -b xxx --repo-url=https://github.com/esrlabs/git-repo.git
repo sync
  • 上述命令关键就在 --repo-url=https://github.com/esrlabs/git-repo.git ,替换掉原生的repo工具链,就能成功初始化了。
  • 不要忘了生成ssh的public key,在Windows下也一样:在Git Bash中执行 ssh-keygen 然后复制 ~/.ssh/id_rsa.pub 文件中的内容添加到Gerrit等源码平台上即可

repo error

1、同一个目录下切换分支或者其他仓库repo,需要删掉.repo然后重新按照workspace搭建。
2、上述命令最好在管理员运行git bash下执行
3、git push时出现git@gitlabxxxxxxx,并要求输入密码,在git里 生成putty key,并设置就可以了。
参考:https://blog.csdn.net/qq_39176597/article/details/81193077

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

瓶0盖

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值