gerrit

Unpublish gerrit change

微笑、不失礼 提交于 2019-12-01 10:59:53
I have accidentally pushed a change to gerrit that should have been pushed as a draft. Now I'd like to unpublish the change back to a draft. Pushing it again to refs/drafts/* doesn't work as it isn't changed. Update: I followed the suggestions of mvp and HiB ; I abandoned the change, amended the commit message (removing the change-id, letting the post-commit hook generate a new change-id) and pushed it again. This resulted in a 'new' draft change. At first it looks OK, but history etc. isn't preserved of course. Not a big issue, but not the clean solution I'm looking for. Once a change is

Unpublish gerrit change

自闭症网瘾萝莉.ら 提交于 2019-12-01 09:27:54
问题 I have accidentally pushed a change to gerrit that should have been pushed as a draft. Now I'd like to unpublish the change back to a draft. Pushing it again to refs/drafts/* doesn't work as it isn't changed. Update: I followed the suggestions of mvp and HiB; I abandoned the change, amended the commit message (removing the change-id, letting the post-commit hook generate a new change-id) and pushed it again. This resulted in a 'new' draft change. At first it looks OK, but history etc. isn't

Jenkins Failed to connect to gerrit repository (Windows installation)

回眸只為那壹抹淺笑 提交于 2019-12-01 08:10:09
I looked around Stackoverflow and google a lot but I am not able to solve my issue. My aim : I want to set up Jenkins to use git SCM to clone a repository host by gerrit My Jenkins config Jenkins version 2.7.1 running on windows as a service Git plugin version 2.5.3 Multiple SCM plugin version 0.6 Gerrit Trigger plugin version 2.21.1 The issue The URL is configured as IHM@IP:/path/to/gerrit/git/IHM.git . IHM is the user which launched Jenkins on a windows server. IP is the adress of the red hat server hosting gerrit. Credentials are set to use user IHM with the ssh key enter directly. The key

Jenkins Failed to connect to gerrit repository (Windows installation)

蓝咒 提交于 2019-12-01 06:29:19
问题 I looked around Stackoverflow and google a lot but I am not able to solve my issue. My aim : I want to set up Jenkins to use git SCM to clone a repository host by gerrit My Jenkins config Jenkins version 2.7.1 running on windows as a service Git plugin version 2.5.3 Multiple SCM plugin version 0.6 Gerrit Trigger plugin version 2.21.1 The issue The URL is configured as IHM@IP:/path/to/gerrit/git/IHM.git . IHM is the user which launched Jenkins on a windows server. IP is the adress of the red

Gerrit authentication: how to disable anonymous user

主宰稳场 提交于 2019-12-01 04:45:51
问题 How can i stop anonymous user to view my project activities in gerrit. I have googled enough but could'nt find what are exact files which are called Access Control List for project. 回答1: If you want to disallow anonymous users to browse/read/search all the changes of a certain project, you just have to remove the Read permission for anonymous users from the project. In order to be allowed to modify permissions, you have to be either Administrator or owner of that project. To disallow

CentOS配置Gerrit Gitlab Jenkins--Gerrit添加Jenkins(6)

徘徊边缘 提交于 2019-12-01 04:25:37
1、Jenkins的下载,安装就不介绍了,默认安装就可以。 2、安装Gerrit trigger Plugin。 3、配置Gerrit trigger 异常:User jenkins has no capability to connect to Gerrit event stream 解决办法: 1、管理员登录gerrit 2、Projects->List->All-Projects->Access 3、Global Capabilities->Stream Events 点击 Non-Interactive Users 添加 Jenkins@XX.com 用户到 ‘Non-Interactive Users’ 组 点Test Connection返回Success,说明配置成功! 4、创建构建工程 5、配置test-reviews Source Code Management,选择Git add Credentials时,选择SSH username方式。 Build Triggers,选择Gerrit event。 Refspec: refs/changes/*:refs/changes/* Branch Specifier:$GERRIT_REFSPEC Gerrit Trigger,选择3所配置的Gerrit Trigger Build,根据情况选择构建脚本

CentOS配置Gerrit Gitlab Jenkins--Gerrit与Gitlab(4)

假如想象 提交于 2019-12-01 04:25:14
1、免密登录配置 创建CentOS gerrit用户的ssh key ssh-keygen -t rsa -C "gerrit@XX.com" 当前用户的.ssh目录下会生成id_rsa,id_rsa.pub,复制id_rsa.pub的内容,添加到Gitlab管理员账号下。 2、创建Grttit工程 管理员登录Gerrit,创建testA,工程名与远程git工程名一致,工程默认被保在: /home/gerrit/gerrit_site/git 删除testA,克隆远程git库的工程 git clone --bare git@192.168.1.11:gerrits/gerrit-review.git 这时的Gerrit相当于Gitlab的镜像或备份 3、 设置 ~/.ssh/config Host 192.168.1.11 IdentityFile ~/.ssh/id_rsa PreferredAuthentications publickey 这里的Host指定的Gitlab的地址。 4、配置 replication.config 文件保存在: /home/gerrit/gerrit_site/etc [remote "gerrit-review"] url = git@ 192.168.1.11: gerrits/${name}.git push = +refs/heads/*

Missing dependency in Gerrit

北战南征 提交于 2019-11-30 23:19:51
I had four changes in Gerrit, each depending on previous one (except first, of course). I've abandoned second and third and reviewed first and fourth. Since first wasn't depending on anything, Gerrit managed to auto-merge it. Now, the fourth (depending on abandoned third) is a real problem. Gerrit states Submitted, Merge Pending with: Change could not be merged because of a missing dependency. The following changes must also be submitted: and giving me change-Id of both abandoned changes. How can I get rid of this chaos? From what I've already learnt by googling and SO-ing (especially this and

通过IDEA提交代码到Gerrit

十年热恋 提交于 2019-11-30 21:58:07
首先,IDEA,需要在setting-plugin中下载安装gerrit插件,以实现gerrit提交相关功能。 然后尝试提交代码,发现被拒绝,在确认有权限的情况下,看了终端,报错缺少Change-Id IDEA不同于eclipse,提交代码时不会自动补全Change-Id,所以需要我们进行配置,以便每次提交时,系统自动生成Change-Id。 于是,开始配置push时自动带上Change-Id,首先将上次commit到本地库的代码进行回退:在项目project处右键git->repository->reset head->修改toCommit的内容HEAD为HEAD^,回滚到上一次操作的位置(可以通过validate查看内容) 然后在项目目录处git bash here,输入截图处错误信息里的命令:gitdir=$(git rev-parse --git-dir); scp -p -P 29418 xuxiaoqiang@review.xxxxx.com:hooks/commit-msg ${gitdir}/hooks/ 若成功, , 失败报错 时,则需要生成ssh key,然后将生成的公钥id_rsa.pub中的内容复制到gerrit中 (参考链接:https://blog.csdn.net/Qve1995/article/details/86315683) 然后重新commit

Gerrit: remote rejected (you are not allowed to upload merges) even though I allowed “Push merge commit”

£可爱£侵袭症+ 提交于 2019-11-30 19:27:40
I've configured Gerrit to allow Push Merge Commit on my branch, but I still get the following error when I try to push a merge commit: ! [remote rejected] ANDROID-foo -> ANDROID-foo (you are not allowed to upload merges) I'm running Gerrit 2.8-1-gaa9367b. Heath Borders This is a bug in gerrit . The workaround is to create another reference named refs/for/refs/heads/<BRANCH_NAME> , and allow Push Merge Commit on it. To be more specifically, add following lines in your project.config file [access "refs/for/refs/*"] pushMerge = group <your-id-here> Workaround which was more suitable for me as it