gerrit

Delete a project in Gerrit

自作多情 提交于 2019-11-30 01:25:54
I can create a project in Gerrit through: ssh –p 29418 [ip-address] gerrit create-project --name [project-name] But, how can I delete any project? I haven't see related commands or buttons on web page. Brad Notice: Since this question was origionally asked, I've released the delete project plugin , and handed it off to the more active Gerrit devs. If you are using Gerrit >= 2.7, I'd recommend this route. If not, read on. There isn't a method to delete projects from Gerrit currently. It must be done by hand. This is the most-requested feature of Gerrit . There are two steps to delete a project

Import repository from git to gerrit

两盒软妹~` 提交于 2019-11-29 23:58:13
I have two questions about Gerrit: How do I convert or import an already existing Git repository into Gerrit's format? There were a lot of commits without Gerrit control, I want to simply push those commits into a Gerrit project. I see two ways to do it: Copy existing bare Git directory to Gerrit and then add it to database. Is that a safe method? Push all commits from my local repository to gerrit repository. How to revert repository from Gerrit to original Git format? Is it required to remove Gerrit's special */for/* branches to do that? First of all: There is no special "Gerrit format".

CentOS配置Gerrit Gitlab Jenkins--Gerrit添加reviewer(5)

假装没事ソ 提交于 2019-11-29 22:57:57
前面已经安装了git-review,这里主要介绍如何将变更提交到Gerrit后review代码,成功后同步到Gitlab,不包含驳回,之后会补全review具体操作流程。 1、添加.gitreview 在 git clone ssh://admin @127.0.0.1 :29418/gerrit-review.git的工程里添加.gitreview git config --global gitreview.remote origin vi .gitreview [admin] host = 172.16.33.15 port = 29418 project = gerrit-review.git admin是我在Gerrit的注册用户 2、配置admin用户权限 管理员登录Gerrit,Projects -> List -> All-Projects -> Access,点击Edit 找到Reference: refs/heads/*,点击Add Perminssion,选择Label Verified和Push Merge Commit,再输入用户组就可以,配置后入下图: Jenkins用户在Non-Interactive Users用户组中,Label Verified添加该用户组。 Label Code-Review下的用户组说明用户有审核代码的权限。

代码检视工具Gerrit的日常使用

半城伤御伤魂 提交于 2019-11-29 22:57:45
1, Gerrit是什么? Gerrit实际上一个Git服务器,它为在其服务器上托管的Git仓库提供一系列权限控制,以及一个用来做Code Review是Web前台页面。当然,其主要功能就是用来做Code Review。 2, Gerrit用户配置 Email激活 Gerrit账户的设置界面,点击“Contact Information”进入Email Register页面,输入自己的邮箱账户( 此邮箱需要与自己的Git配置一致 )。可以配置多个Email账号。 Contact Information SSH key配置 通过以下命令生成并读取本机ssh key: ssh-keygen -t rsa cat ~/.ssh/id_rsa.pub Copy key的内容,在Gerrit账户的设置页面“SSH Public Key”中加入即可。 ssh-key 3, Gerrit日常使用 3.1 获取代码库 登录Gerrit后在Projects-->List, 选择相应工程your_project,进入该工程的General界面。 选中“clone with commit-msg hook”和“SSH”: git clone ssh://your_account@review.xxxxx.com:29418/your_project && scp -p -P 29418 your

使用gerrit作为代码评审工具

↘锁芯ラ 提交于 2019-11-29 22:57:29
需求描述 其实作为项目代码的maintainer,一直习惯于mailing list + git的代码评审及管理,无奈公司主推敏捷+devops,老板让改用gerrit。硬着头皮切换到gerrit,在这里记录下安装配置的过程及踩过的许多坑,以便网友们以后配置gerrit留作参考。 需求其实很简单,我们项目一直使用公司内部一个类似于github的代码托管网站来托管项目代码,使用邮件列表来评审代码。代码通过评审通过后,我再将patch push到代码托管服务器上去。整个开发流程如下图所示: 现在需要切换到gerrit来作为代码评审工具,以便于能够和jenkins集成,搭建一个集开发、构建、测试、部署为一体的devops系统,结构如下图所示。本文只关注gerrit的搭建。 Gerrit简介 安装步骤 1 . 安装Java. 网上有很多安装java的博客和文章,因此在这里不再赘述,可以参考下面这篇文章: Linux下安装java 2 . 给Gerrit单独创建一个账户 #useradd gerrit #passwd gerrit #su gerrit 3 . 下载gerrit gerrit是在google上托管的项目,翻墙下载比较麻烦,可以在这里下载2.11版本的gerrit: 百度网盘下载Gerrit 将网盘中的两个文件gerrit-2.11.war以及bcpkix-jdk15on

Git / gerrit, push remote rejected no changes made

*爱你&永不变心* 提交于 2019-11-29 19:44:24
Made changes to a commit, performed commit amend. Do a push and I get the error: ! [remote rejected] master -> refs/for/master (no changes made) Checked the change ID in the commit message and its still a valid commit. I've tried changing a file, checking it shows up as an alteration and then added to staging area and done another commit amend. Try the push again and getting the same issue. No idea on this one. Edit: This is pushing to gerrit, not git directly. I'm running: git push origin master:refs/for/master And the result of getting the details of origin are (with company details edited

How to git-pull a given patch set from Gerrit?

跟風遠走 提交于 2019-11-29 18:56:42
When working with Gerrit (Code Review), I often need to get a copy of a given patch set for testing or validation purpose. The obvious and easiest way is to download the archive or the patch file through the Gerrit Web interface and manually apply it to my local source. While the above steps are pretty straightforward and fulfill my needs, in the best world I would like to have the patch set appearing as a commit in my local Git. I was looking around and didn't find the solution. I found some sparse info that once compiled together gives the following solution. Say that you want to pull the

Git merge pending due to an abandoned commit

孤街浪徒 提交于 2019-11-29 15:53:04
问题 I have two commits. Commit B depends on commit A. Commit A was abandoned. Now I am getting error for merging B. It says submitted, merge pending due to dependency of B on A. I have googled around but cant find an exact answer. I need step by step solution as I am a novice in git and am finding hard to understand how to resolve this. This is what happened. git commit in local for A. git push for A in remote. A got abandoned, but my local git has commit A. git commit in local for B in same

How to install delete-project plugin in gerrit?

浪子不回头ぞ 提交于 2019-11-29 12:32:00
问题 I want to install delete-project plugin to my gerrit server. As per the latest version, I should clone it from google source and use buck build. I cloned it and my buck is also ready. What are the steps to be followed to build the delete project plugin and add it to my gerrit server. I tried buck build . in the cloned source of delete-project. But, I am getting the following error Traceback (most recent call last): File "/home/gerrit/buck/src/com/facebook/buck/parser/buck.py", line 872, in

How to install/config Git::Hooks to use with Gerrit

吃可爱长大的小学妹 提交于 2019-11-29 12:22:48
The Git::Hooks is a Perl framework for implementing Git/Gerrit hooks. What is the procedure to install and config it to use with Gerrit? Installation 1) Install dependencies: Ubuntu: sudo apt-get install gcc make libcrypt-ssleay-perl Red Hat: sudo yum install gcc make libcrypt-ssleay-perl 2) Install Git::Hooks: sudo cpanm Git::Hooks sudo cpanm Gerrit::REST sudo cpanm JIRA::REST Configuration 0) Be sure you have the hooks plugin installed in Gerrit. 1) Create the Gerrit hooks patchset-created and draft-published (with execution permission) in GERRIT-SITE/hooks directory, with the following