| Summary: | Enable Gerrit for ECF project | ||
|---|---|---|---|
| Product: | Community | Reporter: | Markus Kuppe <bugs.eclipse.org> |
| Component: | Git | Assignee: | Eclipse Webmaster <webmaster> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | remy.suen, sebastian.schmidt2, slewis, thanh.ha, wim.jongman |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Markus Kuppe
You'd have to give us the public key for a user on your end who would be authorized to log into Gerrit on our end and do stuff. Since Gerrit would essentially "own" your Git repos, you understand that if your remote build box gets pwn3d nasty stuff may happen to humanity. [ ] I agree with the terms. Let me in. Isn't Gerrit also supposed to trigger builds on our build box when a new patch comes in? I don't understand how this works with us giving you a pub key. Your CI system can also log into Gerrit to vote on a changeset after it's been built, but if that's not what you're looking to do, then great. Our Gerrit cannot talk to the outside world, so I'm not sure how it would trigger a build on a remote system. (In reply to comment #3) > Our Gerrit cannot talk to the outside world, so I'm not sure how it would > trigger a build on a remote system. No exception to that (our build machine is managed by the OSU admins)? If no, we would problably have to pull Gerrit to kick off a build (and report afterwards). It can make a web call through the proxy, but for everything else, it's on a private, non-routable IP subnet :/ A web call, which includes the git branch name containing the patch, should be sufficient to trigger a Jenkins build. :) Generally though, interfacing Gerrit and our Jenkins builder can be done later. First, ECF has to find out if Gerrit is the right hammer. > First, ECF has to find out if Gerrit is the right hammer.
That is funny :-)
Keep me posted.
(In reply to comment #1) > You'd have to give us the public key for a user on your end who would be > authorized to log into Gerrit on our end and do stuff. Where do you want me to send the pubkey? Attach it here or by email to webmasters? How do we compare fingerprints? Thanks Markus scp it to your home directory on eclipse.org servers. (In reply to comment #9) > scp it to your home directory on eclipse.org servers. It's in /home/data/users/mkuppe/.ssh/authorized_keys Thanks Markus Any word on when ECF can use Gerrit? As it turns out, You can manage your own keys in gerrit. Log into Gerrit and go to https://git.eclipse.org/r/#/settings/ssh-keys You'll be able to add all your keys there, then log in as yourself from a remote system. What is our Gerrit URL? ssh://userid@git.eclipse.org:29418/ecf/org.eclipse.ecf.git/ doesn't work nor does ECF show up as a project on https://git.eclipse.org/r/ I don't think Gerrit was actually enabled for ECF as comment 6 implied we should wait for the project to decide. Since it sounds like you've decided I've enabled Gerrit for /gitroot/ecf/org.eclipse.ecf.git, which you should be able to access via: ssh://userid@git.eclipse.org:29418/ecf/org.eclipse.ecf.git/ https://git.eclipse.org/r/p/ecf/org.eclipse.ecf.git. -M. When trying to push to gerrit I get: sebs@lxsebs:~/ecf$ git push gerrit Enter passphrase for key '/home/sebs/.ssh/id_rsa': fatal: One or more refs/for/ names blocks change upload fatal: The remote end hung up unexpectedly I used the following remote config: [remote "gerrit"] url = ssh://sschmidt@git.eclipse.org:29418/ecf/org.eclipse.ecf.git fetch = +refs/heads/master:refs/remotes/gerrit/master push = HEAD:refs/for/master Is there maybe something wrong with my config? Or some problems with the repository? The Code Recommenders project apparently had the same issue before: https://bugs.eclipse.org/bugs/show_bug.cgi?id=372131#c3 This sounds like 372131 and 377415. I've run the fix from those bugs, so let me know if you're still having issues. org.eclipse.ecf.git # git for-each-ref refs/for b6aa593a73526e1f5c40c088f158b30535453278 commit refs/for/master org.eclipse.ecf.git # for n in $(git for-each-ref --format='%(refname)' refs/for); do git update-ref -d $n; done org.eclipse.ecf.git # git for-each-ref refs/for org.eclipse.ecf.git # -M. (In reply to comment #16) > This sounds like 372131 and 377415. I've run the fix from those bugs, so > let me know if you're still having issues. > We are still having issues: If I push with ssh I get: ssh://wxxxxn@git.eclipse.org:29418/ecf/org.eclipse.ecf.git: java.net.ConnectException: Connection refused: connect with https: https://git.eclipse.org/r/p/ecf/org.eclipse.ecf.git: not authorized If I look in the Gerrit error logs I see things that indicate you're using your gmail address rather than the email we have on file. Have you recently updated your gerrit account? It's also possible there is a block on your IP if you send it to me I'll go digging. -M. (In reply to comment #18) > If I look in the Gerrit error logs I see things that indicate you're using > your gmail address rather than the email we have on file. Have you recently > updated your gerrit account? > > It's also possible there is a block on your IP if you send it to me I'll go > digging. Hi Matt, I have changed my account recently but I can push to e4 Gerrit fine. I cannot push to ECF Gerrit. I have no idea why the gmail email pops up. I can still not push to ECF gerrit also not from home. I keep on getting the not authorized message. Home ip: 62.194.239.173 (In reply to comment #19) > I have changed my account recently but I can push to e4 Gerrit fine. I > cannot push to ECF Gerrit. I reset your password so I could add my key to Gerrit and try pushing using your account and had no issues committing a 1 line change to org.eclipse.ecf/examples/bundles/org.eclipse.ecf.examples.webinar/urls.txt. This is the URL I used for checkout and commit: ssh://wjongman@git.eclipse.org:29418/ecf/org.eclipse.ecf.git This post(http://stackoverflow.com/questions/14320817/how-to-push-change-to-gerrit-server-via-http) implies that you'll need to generate a password to push via HTTPS ( I suspect this is the cause of the 'not authorized' message) > Home ip: 62.194.239.173 I checked and there isn't a block on that IP or the class C subnet. -M. (In reply to comment #20) I understand the https push problems now and the ssh push is probably caused by a company policy on the port. Thanks for sticking with me Matt. I appreciate that. I will try again from home tonight. I have changed my pw in gerrit and pushed with wjongman and the gerrit password: I now get: https://git.eclipse.org/r/p/ecf/org.eclipse.ecf.git: 500 com.google.inject.ProvisionException: Guice provision errors: 1) Error in custom provider, java.lang.IllegalStateException: Request has already been cleaned up ==== Cleanup Calling Thread: HTTP-98987 java.lang.Thread.getStackTraceImpl(Native Method) java.lang.Thread.getStackTrace(Thread.java:1042) com.google.gerrit.server.RequestCleanup.collectCleanupThreadInfo(RequestCleanup.java:73) com.google.gerrit.server.RequestCleanup.run(RequestCleanup.java:54) com.google.gerrit.httpd.RequestContextFilter.doFilter(RequestContextFilter.java:91) com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1322) org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java (In reply to comment #22) If I try to push with ssh, user wjongman password: my eclipse password ssh://wjongman@git.eclipse.org:29418/ecf/org.eclipse.ecf.git: Auth fail (In reply to comment #23) > If I try to push with ssh, user wjongman password: my eclipse password Not sure I have an explanation for this as I uploaded my ssh key to the Gerrit key manager(Settings -> SSH Public keys) to do the testing. Since the sshd service gerrit provides is different than the system ssh service, perhaps the password you generated for HTTPS access could be used? Or you could try public key authentication. (In reply to comment #22) > I have changed my pw in gerrit and pushed with wjongman and the gerrit > password: > I see the following in the logs: 'wjongman' failed to sign in: No such user:wjongman A little digging on Google and staring at the config file makes me think you should be using the email address associated with your committer account rather than your committer id for this service. -M. I use my username that Gerrit tells me in Settings > Profile. In my case it's actually the same username ass my committer id. As for password, Gerrit SSH does not allow password authentication. You MUST upload a SSH Public Key to authenticate if you want to use SSH. If this is an issue for you and you want to use a password, you can also use the https url which will allow you to use a password. In this case however Gerrit will generate a http password for you Settings > HTTP Password. Hope this helps. (In reply to comment #25) If I use my gerrit user: wjongman and the gerrit password together with push uri https:// ... I get the error as shown in comment 22. I can pull and clone from the https uri just fine. (In reply to comment #26) > (In reply to comment #25) > > If I use my gerrit user: wjongman and the gerrit password together with push > uri > > https:// ... > > I get the error as shown in comment 22. I found a Gerrit post about a similar issue: https://groups.google.com/forum/?fromgroups=#!topic/repo-discuss/OP6hg1KYah8 Can you try without the /p/ part in the URL? (In reply to comment #28) You are the greatest Thanh! Thanks! That worked. I've just tried to configure my own use with gerrit, and have gotten some of the way, but not all the way to push :) I changed my ssh url to be: ssh://slewis@git.eclipse.org:29418/gitroot/ecf/org.eclipse.ecf.git I then tried to push and got Auth fail. I logged into gerrit and uploaded my public key...but now when I attempt to push it says: ssh://slewis@git.eclipse.org:29418/gitroot/ecf/org.eclipse.ecf.git: not a Gerrit project Do I have the incorrect path or something? When I look in the list of projects (in Gerrit) I do not see rt/org.eclipse.ecf listed at all. BTW...ECF has two git repos...i.e. one for source and one for website. Are these both going to be moved to gerrit? ...or only the source one? (my current assumption). (In reply to comment #30) > ssh://slewis@git.eclipse.org:29418/gitroot/ecf/org.eclipse.ecf.git: not a > Gerrit project > > Do I have the incorrect path or something? When I look in the list of > projects (in Gerrit) I do not see rt/org.eclipse.ecf listed at all. Yes, remove the "gitroot/" part. ssh://git.eclipse.org:29418/ecf/org.eclipse.ecf.git (In reply to comment #31) > (In reply to comment #30) > > ssh://slewis@git.eclipse.org:29418/gitroot/ecf/org.eclipse.ecf.git: not a > > Gerrit project > > > > Do I have the incorrect path or something? When I look in the list of > > projects (in Gerrit) I do not see rt/org.eclipse.ecf listed at all. > > Yes, remove the "gitroot/" part. > > ssh://git.eclipse.org:29418/ecf/org.eclipse.ecf.git Ok...thanks Markus. That does it. Markus...would you be willing to send a note to ecf-dev?...for current committers to do the changeover? And at least point them to this bug...wrt https and ssh changes (if you could summarize them that would be great). Hopefully the experience of the three of us (Markus, Wim, and myself) can help simplify the transition for other committers. |