当前位置:网站首页>一台电脑上 多个项目公用一个 公私钥对拉取gerrit服务器代码
一台电脑上 多个项目公用一个 公私钥对拉取gerrit服务器代码
2022-07-28 11:40:00 【yi_tianchou】
gerrit服务器拉去android代码
1、已经通过 ssh-key 在本地 .ssh 文件夹下 生成 公私钥对
2、登陆gerrit服务器
3、进入 gerrit 下etc目录
cd /home/gerrit/项目名/etc
执行 sudo htpasswd gerrit.passwd xxx(gerrit登陆用户名) ---将用户名添加到 gerrit.passwd里 cat,vi等指令可以查看内容
New password:(输入登陆gerrit平台密码)
Re-type new password:(再次输入登陆gerrit平台密码)两次要一致,用于后面登陆gerrit web页面注册邮箱及上传公钥用
4、登陆 gerrit web页面 使用刚才通过htpasswd指令添加的用户名和密码

输入之后登陆

点击右上角 数字 ,将弹出一个页面, 在 未注册邮箱时显示的是一串数字
点击 setting, 出现新的页面 ,然后点击register New Email

5、到邮箱中确认 邮件, 在同一个浏览器下 访问邮件中的连接,(注意要在同一个浏览器下,否则连接中没有cookie ,将无法注册成功),成功后的页面将跳转到 gerrit页面,显示 用户名和 邮箱。如图

6、上传自己电脑上新建的 公钥,默认在 home/用户/.ssh/ 默认文件名 id_rsa (私钥) id_rsa.pub(公钥)
打开id_rsa.pub 文件,将文件内容全部复制 .

至此 在gerrit上添加 公私钥完成,
7、在自己电脑上 新建文件加,用来拉去代码
命令行中 cd到 新创建的文件夹
指令:ssh -p 39417 user1@192.168.1.30 gerrit ls-projects 验证连接服务器是否正常
指令:git clone ssh://user1@192.168.1.30:39417/repo 克隆服务上的 repo
(或者是从别的地方拷贝 ,放在 新建 .repo文件夹 将repo文件夹考进去)
指令:./repo/repo init --repo-url ssh://user1@192.168.30:39417/repo -u ssh://user1@192.168.30:39147/rk/platform/manifest -b android-7.0 -m rk3288_tablet_nougat_release.xml
需要填写用户名user1 邮件填自己的
如果上述步骤不出错
./repo/repo sync 即开始拉取代码
android 7.1 代码大概 60多G,80多万文件,repo 大概需要100G多一点,所以注意磁盘空间。
第一个代码可以拉取之后,同理 将本地的公私钥对添加到项目二中,执行相同的步骤可以下载项目二的代码
多个项目可以公用 一个公私钥对,
边栏推荐
- IRBuilder
- Using Arduino to develop esp8266 to build a development environment
- Library automatic reservation script
- C for循环内定义int i变量出现的重定义问题
- Solve the PHP prompt warning: division by zero in error
- First in the country! The two standards of "data product registration" formulated by insight technology and Shandong data were officially released
- Introduction to resttemplate
- How to realize more multimedia functions through the ffmpeg library and NaPi mechanism integrated in openharmony system?
- 西门子对接Leuze BPS_304i 笔记
- Uniapp wechat applet realizes the function of connecting low-power Bluetooth printing
猜你喜欢

GMT安装与使用

Open source database innovation in the era of digital economy | the 2022 open atom global open source summit database sub forum was successfully held

分布式定时器

西门子对接Leuze BPS_304i 笔记

揭秘界面控件DevExpress WinForms为何弃用受关注的MaskBox属性

金九银十 再不卷就来不及了

Arduino Pro Mini atmega328p connect and light the first LED (at the same time, record the problem of burning failure stk500_recv)

Why do enterprises need the ability of enterprise knowledge management?

【一知半解】零值拷贝

Foam exploded three times, why did Luo Yonghao put all his eggs in one basket to do ar?
随机推荐
Marketing play is changeable, and understanding the rules is the key!
聚变云原生,赋能新里程 | 2022 开放原子全球开源峰会云原生分论坛圆满召开
开源社区三十年 | 2022 开放原子全球开源峰会开源社区三十年专题活动圆满召开
How can a novice quickly complete the establishment of a website? Come to the free "fitting room" experience
IRBuilder
HMS core audio editing service supports 7 kinds of audio effects to help one-stop audio processing
易观分析:以用户为中心提升手机银行用户体验,助力用户价值增长
设计一个线程池
Using Arduino to develop esp8266 to build a development environment
Implementation method of mouse hover, click and double click in ue4/5
Zadig v1.13.0 believes in the power of openness, and workflow connects all values
Developing NES games with C language (cc65) 10. Game cycle
Great! Jd.com developed the highly available website construction technology PDF recommended by the first brother. Prepare the water and chew it slowly
What SaaS architecture design does a software architect need to know?
SQL injection less26 (filter spaces and comments, and use error injection without spaces)
IRBuilder
奥浦迈生物通过注册:半年营收1.47亿 国寿成达与达晨是股东
Industry, University, research and application jointly build an open source talent ecosystem | the 2022 open atom global open source summit education sub forum was successfully held
MySQL之知识点(十三)
sqli-labs(less-8)