Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 372131 - Please enable Gerrit for Recommenders
Summary: Please enable Gerrit for Recommenders
Status: CLOSED FIXED
Alias: None
Product: Community
Classification: Eclipse Foundation
Component: Git (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eclipse Webmaster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 372310 372312
  Show dependency tree
 
Reported: 2012-02-21 11:15 EST by Marcel Bruch CLA
Modified: 2012-02-27 16:14 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Bruch CLA 2012-02-21 11:15:45 EST
Please enable Gerrit for Recommenders main repository. I would like project committers to be able to bypass the Gerrit code review system and push changes directly to the git repo.

git.eclipse.org/c/recommenders/org.eclipse.recommenders.git/
Comment 1 Eclipse Webmaster CLA 2012-02-22 13:51:01 EST
I've enabled the repo: recommenders/org.eclipse.recommenders.git for Gerrit.  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

Your Gerrit-enabled repo URLs:
ssh://userid@git.eclipse.org:29418/recommenders/org.eclipse.recommenders.git
https://git.eclipse.org/r/p/recommenders/org.eclipse.recommenders.git

My understanding is you will need to use these URLs to push even without the
code review.

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

-M.
Comment 2 Marcel Bruch CLA 2012-02-22 14:22:44 EST
Thanks!
Comment 3 Marcel Bruch CLA 2012-02-23 05:30:53 EST
When pushing to gerrit I get the following error:

Holzfisch:org.eclipse.recommenders Marcel$ git push ssh://mbruch@git.eclipse.org:29418/recommenders/org.eclipse.recommenders.git HEAD:refs/for/master

fatal: One or more refs/for/ names blocks change upload
fatal: The remote end hung up unexpectedly


and when trying to bypass refs/for:

Holzfisch:org.eclipse.recommenders Marcel$ git push ssh://mbruch@git.eclipse.org:29418/recommenders/org.eclipse.recommenders.git HEAD:refs/heads/master

fatal: One or more refs/for/ names blocks change upload
fatal: The remote end hung up unexpectedly
 
I've actually no idea why this happens (mistake on my end?). The error is described here:
https://review.typo3.org/Documentation/error-change-upload-blocked.html

I've only restricted shell at git.eclipse.org. Thus, I did not execute the command mentioned here. Can I get non-restricted access by the way?
Comment 4 Eclipse Webmaster CLA 2012-02-23 09:49:18 EST
I tried checking out the git repo from Gerrit and running the git command from the linked page, but it returns nothing(I was unable to figure out how else to run it).

You have non-restricted access on build, which mounts the repo, but since Gerrit owns the repo you won't be able to make any changes.

I've cc'd Matthias as he's been a great help with other parts of getting Gerrit up and running.

-M.
Comment 5 Marcel Bruch CLA 2012-02-27 01:08:40 EST
Matthias,
do you have any ideas how to fix this? Any help on this is greatly appreciated.

Matt,
if we don't get it fixed soon, I'd like to switch back to the old approach until this could be fixed. We have to deliver bugfixes and the workarounds we put in place now are quite time consuming w/op build automation.
Comment 6 Eclipse Webmaster CLA 2012-02-27 11:39:15 EST
Ok, I"ve applied the changes Denis decided on for this here(371411). 

You should now be able to push directly via git.eclipse.org/gitroot/recommenders as you have in the past.

-M.
Comment 7 Marcel Bruch CLA 2012-02-27 16:14:24 EST
(In reply to comment #6)
> Ok, I"ve applied the changes Denis decided on for this here(371411). 
> 
> You should now be able to push directly via
> git.eclipse.org/gitroot/recommenders as you have in the past.
> 
> -M.

Thanks. After I got access to the repo I was able to fix it. I followed the instructions in https://review.typo3.org/Documentation/error-change-upload-blocked.html.

I entered:
> $ git for-each-ref refs/for
which showed:
> c5b1d09af0177ecf1aff5b7586941376f0192608 commit	refs/for/contrib/extdoc


So, there was some commit some time ago using the refs/for namespace.

After calling 
> $ for n in $(git for-each-ref --format='%(refname)' refs/for); do git update-ref -d $n; done

> $ git for-each-ref refs/for
shows nothing anymore and pushing to gerrit works as expected:

> $ git push ssh://<>@git.eclipse.org:29418/recommenders/org.eclipse.recommenders.git HEAD:refs/for/master

Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 343 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Resolving deltas:   0% (0/2)
To ssh://<>@git.eclipse.org:29418/recommenders/org.eclipse.recommenders.git
 * [new branch]      HEAD -> refs/for/master

Thanks for your assistance.