| 引用 | 说明 | | ---------------------- | ------------------------------------------------------------ | | refs/heads/* | 对应git的refs/heads/* 意味这可以直接改变指针引用跳过所有的code reviewer过程,用于网页操作以及后台直接git命令操作 | | refs/tags/* | tag权限 | | refs/meta/config | ACL的存储位置 | | refs/meta/dashboards/* | dashboards相关,jenkins | | refs/notes/review | 基本不需要 | | refs/for/
| 权限 | 说明 | refs/head/* | refs/for/refs/head/* | | ------------------ | ------------------------------------------------------------ | ------------------------ | -------------------- | | Owner | 仓库拥有者,可以更改仓内所有权限 | Leader | Leader | | Read | 下载代码的权限,以及仓库可见性 | Developer | | | Abandon | 废弃提交(change) | Approver | Approver | | Create Reference | 创建引用(分支、标签) | Leader | Leader | | Forge Author | push时不检查作者是否一致 | Approver | Approver | | Forge Committer | push时不检查提交者是否一致 | Approver | Approver | | Forge Server | push含有由gerrit生成的merge提交时不检查上述信息 | Leader | Leader | | Push | 提交权限,拥有Create Reference的人可以创建分支,勾选Force option可以删除分支 | Leader | Leader | | Push Merge Commits | 是否可以push带有merge的commit | Leader | Approver | | Push Annotated Tag | 提交带描述的标签 | Leader | Approver | | Push Signed Tag | 提交签名的标签 | Leader | Approver | | Rebase | 在页面上进行rebase操作 | submitter和owner默认就有 | | | Remove Reviewer | 移除审核人员,一般不太用 | Approver | | | Label Verified | 审核权限 | Developer | | | Label Code-Review | 审核权限 | Approver | | | Submit | 入库权限 | Approver | |
sudo htpasswd -c ~/gerrit_site/etc/passwords
sudo htpasswd -b ~/gerrit_site/etc/passwords username password
sudo htpasswd -D ~/gerrit_site/etc/passwords username
ssh -p 29418 username@172.16.0.34
ssh -p 29418 username@gerrit-ip-address gerrit create-project --name project_name
git push ssh://username@localhost:29418/demo-project *:*
git push origin --delete tag 删除远端标签
git config --global url."ssh://mrobot@172.16.0.34".insteadOf "ssh://username@172.16.0.34"
git clone --mirror https://github.xxx.git
命令行为远端项目增加父工程,从而继承可见权限
ssh -p 29418 gerrit2@localhost gerrit set-project-parent --parent Share-Projects x86/external/rgbd_launch
$ ssh -p @SSH_PORT@ @SSH_HOST@ @PLUGIN@ project-1 project-2
$ repo init -u ssh://jenkins@172.16.0.34:29418/project/manifests.git -b release -m mty_catkin_ws.xml --no-repo-verify