gerrit

Gerrit replicating to gitolite fails

人盡茶涼 提交于 2019-12-07 12:05:17
问题 I have configured the replication with following configurations $cat /var/gerrit/review_site/etc/replication.config [gerrit] autoReload=true [remote "bt-git"] projects = ^vt-(.*)$ push = refs/heads/*:refs/heads/* url = git@git.something.com:/${name}.git My ssh config file looks like this one, Host git HostName git.something.com User git IdentityFile /var/gerrit/.ssh/id_rsa StrictHostKeyChecking no UserKnownHostsFile /dev/null Although I have already added the right set of hostkeys in my ~/

Why does “git clone” not take a refspec?

空扰寡人 提交于 2019-12-07 04:08:18
问题 It appears that a lot of folks have gone to replacing git clone with the combo git init && git fetch . This seems rather silly, and unfortunately tools like Jenkins won't do that for you. So why does git clone not take a refspec, the same way git fetch does? Specifically, if you wish to run a gerrit triggered build task on Jenkins, you need to ensure that the workspace exists, otherwise jenkins will fail to checkout the revision containing the gerrit change. This is because gerrit uses a ref

How to do backup of development branches with Gerrit?

六月ゝ 毕业季﹏ 提交于 2019-12-06 16:01:17
I'm using Gerrit to manage my git repository. Patches are sent to Gerrit server and merged into the git repository when they are approved. However, often a feature takes some time to develop and the developer wants to keep a backup of the code under development. The obvious solution is to push the branch directly to Gerrit, but then https://code.google.com/p/gerrit/issues/detail?id=1986 prevents me from submitting this branch to review. A possible hack is to remove the remote branch when I want to submit it to review. A second one is to rebase the remote branch and update change IDs when I

missing Change-Id in commit message footer for git-review

梦想与她 提交于 2019-12-06 15:36:31
I've cloned an empty repository from Gerrit. I've created a new branch called "new_files" and pulled an upstream into it. When I'm trying to run git-review, I get such an error: The outstanding commits are: 6d5d8ac (HEAD, new_files) Change-Id: If528f4dd29638e8c2a8d18a624a289afe390e6e2 cc81223 Merge branch 'master' of UPSTREAM into new_files d787290 (upstream/master) rename properties to dat 32d76cf rename properties to dat 73d8e05 rename data to properties e46416e Add file. 8bfcab5 referencing properties e8b03fc rename data Do you really want to submit the above commits? Type 'yes' to confirm,

gerrit关闭管理员权限后解决办法

泄露秘密 提交于 2019-12-06 14:24:59
问题描述:gerrit以管理员的身份登录后,create new list和 create new group不显示,导致无法创建新的项目和权限组 出现问题:gerrit可视化页面误删all_project的权限(以下所有新增项目都继承all_project的权限),导致所有项目无法提交代码 ( Administrators -Server block了,查看是否是此问题,进入All-Project项目---Accessz中查看)。 排查问题的过程 1、查看数据库管理员权限,然而数据库中的权限是管理员。 2、查看服务器配置gerrit.config文件配置,确定没有问题继续看 3、查看服务器配置secure.config 文件配置,密码是否保持一致 4、查看目录是否拥有gerrit权限 5、查看nginx配置 解决办法: 1、进入服务器git安装的路径下的etc 执行vi gerrit.conf 查看仓库的存放位置 2、进入git仓库,执行 git clone All-Projects.git/ yy ,(yy是clone的仓库名) 3、将All-Project下载下来编辑project.config文件,(因project.config是隐藏文件,必须要clone下来修改) 3.1、需要修改下载仓库的权限(包括子目录),和all_project的权限一致, 3.2、vim

Push bypasses Gerrit Code Review (TortoiseGit)

∥☆過路亽.° 提交于 2019-12-06 12:43:16
问题 I need to be able to push to a repository but using the code-review feature. To push I am using tortoisegit for this, when pushing to master I get this error: ssh://myusername@myorganization:29418/project ! [remote rejected] master -> master (can not update the reference as a fast forward) error: failed to push some refs to ssh://myusername@myorganization:29418/project The only way I am able to push is by adding the Push permission to the group but this bypasses the code-review. How can I set

“error.GitError: remote has no review url” encountered with Gerrit/repo

為{幸葍}努か 提交于 2019-12-06 09:30:39
I'm trying to set up Gerrit and repo for Android development in a closed shop. I had very little trouble installing a Gerrit server, but I'm getting this error at a client workstation: $ repo start Falk . $ vi AndroidManifest.xml $ git commit -m 'minor change' -a [Falk b3398ba] minor change 1 file changed, 2 insertions(+) $ repo upload . Upload project packages/apps/Calculator/ to remote branch refs/tags/android-5.1.0_r1: branch Falk ( 1 commit, Thu Mar 17 15:20:09 2016 -0700): 72aa6b93 just a minor change to None (y/N)? y Traceback (most recent call last): ... error.GitError: remote aosp has

Gerrit change-merged Hook

a 夏天 提交于 2019-12-06 08:13:53
问题 I use git as my version control system and have set up a Gerrit site to do the code review. I would like to create a hook to do the following: When the admin clicks the Submit button, a file (called version.txt ) should be modified. Script should open the file. Find the following text (where the ID may change) #version Change-Id: Ie1411d50f6beb885bc3d3b7d8c587635e1446c18 Replace the Change-Id with the Change-Id of the new patch. So, if the patch being merged has the Change-Id:

Is two way sync between gerrit and github.com possible?

我的未来我决定 提交于 2019-12-06 08:04:52
For a project exisitng in github.com private repository, I am setting up gerrit code review. I am using the gerrit's replication plugin to keep the gerrit repository in sync with github.com. But if someone commits (say commit-a ) and pushes directly to github.com, the commit-a is overwritten in github.com, when gerrit does the replication process (because, it replicates only the things in gerrit mirror). But I want to implement a 2-way sync. Something like, whenever a push is made to gerrit, it has to check github.com and update its mirror with new code from there and then to continue the

Importing already existing git repo with multiple branches and tags into gerrit

走远了吗. 提交于 2019-12-06 07:44:53
问题 I'm trying to import an already existing git repository with multiple branches and tags into gerrit. I'm following the official guide at https://gerrit-review.googlesource.com/Documentation/install-quick.html#_already_existing_project. However, when issuing the push command all the branches and tags, except "master" which I'm currently in, are "prohibited by Gerrit". The output is something like this: user@host:~/my-project$ git push ssh://user@localhost:29418/demo-project *:* [....] * [new