当前位置:网站首页>一台电脑上 多个项目公用一个 公私钥对拉取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多一点,所以注意磁盘空间。
第一个代码可以拉取之后,同理 将本地的公私钥对添加到项目二中,执行相同的步骤可以下载项目二的代码
多个项目可以公用 一个公私钥对,
边栏推荐
- OpenAtom OpenHarmony分论坛圆满举办,生态与产业发展迈向新征程
- Knowledge points of MySQL (13)
- Develop NES game (cc65) 07 and controller with C language (collision with spirit)
- Unity加载Glb模型
- Uninstall Navicat: genuine MySQL official client, really fragrant!
- Great! Jd.com developed the highly available website construction technology PDF recommended by the first brother. Prepare the water and chew it slowly
- Brief discussion on open source OS distribution
- AsiaInfo technology released antdb7.0, a "Telecom grade" core transaction database, to help government and enterprises "trust" to create the future!
- 用C语言开发NES游戏(CC65)02、什么是v-blank?
- 让arduino支持nuvotom新唐
猜你喜欢

图书馆自动预约脚本

How does musk lay off staff?

Uninstall Navicat: genuine MySQL official client, really fragrant!

【萌新解题】爬楼梯

Anhui Jingzhun: Beidou satellite synchronous clock | Beidou synchronous clock | NTP network clock server

Unity 安装 Device Simulator

Huawei releases harmonyos 3 and all scene new products, and the smart experience goes further

奥浦迈生物通过注册:半年营收1.47亿 国寿成达与达晨是股东
![[half understood] zero value copy](/img/5b/18082c1ea93f2e3bbf4920d73163fd.png)
[half understood] zero value copy

洪九果品通过聆讯:5个月经营利润9亿 阿里与中国农垦是股东
随机推荐
Functions and pointers in 08 go language
Distributed timer
Developing NES games with C language (cc65) 08. Background collision
洪九果品通过聆讯:5个月经营利润9亿 阿里与中国农垦是股东
论治理与创新 | 2022 开放原子全球开源峰会 OpenAnolis 分论坛圆满召开
开源社区三十年 | 2022 开放原子全球开源峰会开源社区三十年专题活动圆满召开
产学研用 共建开源人才生态 | 2022 开放原子全球开源峰会教育分论坛圆满召开
Localization, low latency, green and low carbon: Alibaba cloud officially launched Fuzhou data center
MySQL之知识点(十三)
Introduction to resttemplate
用C语言开发NES游戏(CC65)09、滚动
Developing NES games with C language (cc65) 10. Game cycle
Fusion cloud native, enabling new mileage | 2022 open atom global open source summit cloud native sub forum successfully held
Redis实现分布式锁
stm32 回环结构接收串口数据并处理
恋爱男女十禁
First in the country! The two standards of "data product registration" formulated by insight technology and Shandong data were officially released
奥浦迈生物通过注册:半年营收1.47亿 国寿成达与达晨是股东
PHP gets all the dates of this week or the last seven days
With the continuous waves of infringement, the U.S. patent and trademark office began to study the impact of NFT on copyright