Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 472381 - Enabling Gerrit on WTP j2ee project
Summary: Enabling Gerrit on WTP j2ee project
Status: RESOLVED FIXED
Alias: None
Product: Community
Classification: Eclipse Foundation
Component: Gerrit (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eclipse Webmaster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-10 10:20 EDT by Chuck Bridgham CLA
Modified: 2015-07-16 11:41 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chuck Bridgham CLA 2015-07-10 10:20:44 EDT
Can you please enable Gerrit on the following j2ee repositories?
git://git.eclipse.org/gitroot/jeetools/webtools.javaee.git/
git://git.eclipse.org/gitroot/jeetools/webtools.javaee.tests.git/

We'd like to allow the current committers to push directly to Git repository with out code review.
Comment 1 Mikaël Barbero CLA 2015-07-10 10:37:27 EDT
I will do the modification now. The repositories won't be available for the next 15/20min.
Comment 2 Mikaël Barbero CLA 2015-07-10 10:46:51 EDT
I've enabled Gerrit for jeetools. You must now use the Gerrit URLs below for origin.

You can add it to the list of projects you watch:

https://git.eclipse.org/r/#/settings/projects

Upload your SSH public keys to Gerrit if you wish to use SSH:
https://git.eclipse.org/r/#/settings/ssh-keys

Gerrit uses a specific password for https repo access.  You can set/reset the password here:
https://git.eclipse.org/r/#/settings/http-password


Your Gerrit-enabled repo URLs:
ssh://committer_id@git.eclipse.org:29418/jeetools/webtools.javaee
https://committer_id@git.eclipse.org/r/jeetools/webtools.javaee

ssh://committer_id@git.eclipse.org:29418/jeetools/webtools.javaee.tests
https://committer_id@git.eclipse.org/r/jeetools/webtools.javaee.tests

Gerrit@Eclipse docs:
http://wiki.eclipse.org/Gerrit

Projects can push directly to master and bypass code review by pushing to refs/heads/master

Contributors and committers must push to refs/for/master to trigger code review.
Comment 3 Chuck Bridgham CLA 2015-07-13 14:03:46 EDT
Sorry - for not catching earlier...  but the ejb repository is also part of the jeetools project.

http://git.eclipse.org/c/jeetools/webtools.ejb.git/

Can we enable this as well?

Thanks - Chuck
Comment 4 Mikaël Barbero CLA 2015-07-13 14:14:36 EDT
Done.
Comment 5 Kaloyan Raev CLA 2015-07-15 18:01:59 EDT
Mikael, I am a committer in the Java EE Tools project and I am testing the Gerrit workflow.

I am not able to push to Gerrit both via ssh and https.

If I try via ssh I get the following error:

ssh://kraev@git.eclipse.org:29418/jeetools/webtools.javaee: push not permitted

If a try via http then the error is:

https://kraev@git.eclipse.org/r/jeetools/webtools.javaee: 
One or more refs/for/ names blocks change upload

I am pretty sure my setup is OK since I am able to push to the Gerrit of many other Eclipse project.

Could you verify the Gerrit configuration?
Comment 6 Denis Roy CLA 2015-07-16 10:38:02 EDT
Gerrit logs say:
[2015-07-15 17:35:50,177] ERROR com.google.gerrit.server.util.MagicBranch : Repository 'jeetools/webtools.javaee' needs the following refs removed to receive changes: [R3_5_maintenance]


We normally see this when someone pushes to refs/for/* outside of Gerrit.

After cloning, I see:
$ git ls-remote origin refs/for/*
ce2fe1ee8206ca9045bcb42d746183783c62f8b8        refs/for/R3_5_maintenance


To fix this, we need to delete the ref:
git update-ref -d refs/for/R3_5_maintenance

Are we clear to do that?
Comment 7 Kaloyan Raev CLA 2015-07-16 10:45:44 EDT
Yes, please remove it.

We are just introducing Gerrit to this project. Perhaps, someone pushed to refs/for/R3_5_maintenance by mistake in the past.
Comment 8 Denis Roy CLA 2015-07-16 11:17:38 EDT
Awesome .. give it a try now.
Comment 9 Kaloyan Raev CLA 2015-07-16 11:41:23 EDT
Not the push to Gerrit is successful. Thanks!
Comment 10 Kaloyan Raev CLA 2015-07-16 11:41:52 EDT
(In reply to Kaloyan Raev from comment #9)
> Not the push to Gerrit is successful. Thanks!

I meant "Now", not "Not"...