The HTTP server did not provide the username in the GITHUB_USER header when it forwarded the request to Gerrit Code Review.
If the HTTP server is Apache HTTPd, check the proxy configuration includes an authorization directive with the proper location, ensuring it ends with '/':
<VirtualHost hostname:8080> ServerName hostname.com ProxyRequests Off ProxyVia Off ProxyPreserveHost On <Proxy *> Order deny,allow Allow from all </Proxy><Location /login/> AuthType Basic AuthName "Gerrit Code Review" Require valid-user ... </Location>AllowEncodedSlashes On ProxyPass / http://.../ nodecode </VirtualHost>
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe, email repo-discuss+unsub...@googlegroups.com
For more options, visit https://groups.google.com/d/optout.
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[2014-07-21 17:41:05,197] INFO com.google.gerrit.pgm.Daemon : Gerrit Code Review 2.9-rc2 ready
[2014-07-21 17:41:26,456] ERROR velocity : ResourceManager : unable to find resource '' in any resource loader.
[2014-07-21 17:41:26,457] ERROR com.googlesource.gerrit.plugins.github.velocity.VelocityViewServlet : Cannot load velocity template
org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource ''
at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:483)
at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:354)
at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1400)
at com.googlesource.gerrit.plugins.github.velocity.VelocityViewServlet.service(VelocityViewServlet.java:89)
at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:278)
at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:268)
at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:180)
Hi,
[2014-09-03 00:55:45,493] ERROR com.google.gerrit.httpd.auth.container.HttpLoginServlet : Unable to authenticate user "erikcas"com.google.gerrit.server.account.AccountUserNameException: Cannot assign user name at com.google.gerrit.server.account.AccountManager.handleSettingUserNameFailure(AccountManager.java:303) at com.google.gerrit.server.account.AccountManager.create(AccountManager.java:255) at com.google.gerrit.server.account.AccountManager.authenticate(AccountManager.java:113) at com.google.gerrit.httpd.auth.container.HttpLoginServlet.doGet(HttpLoginServlet.java:118) at javax.servlet.http.HttpServlet.service(HttpServlet.java:735) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:281) at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:271) at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:180) at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:93) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85) at com.google.gwtexpui.server.CacheControlFilter.doFilter(CacheControlFilter.java:70) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) at com.google.gerrit.httpd.auth.github.OAuthWebFilter.doFilter(OAuthWebFilter.java:87) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) at com.google.gerrit.httpd.RunAsFilter.doFilter(RunAsFilter.java:113) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) at com.google.gerrit.httpd.AllRequestFilter$FilterProxy$1.doFilter(AllRequestFilter.java:64) at com.google.gerrit.httpd.AllRequestFilter$FilterProxy.doFilter(AllRequestFilter.java:57) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) at com.google.gerrit.httpd.RequestContextFilter.doFilter(RequestContextFilter.java:75) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120) at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133) at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130) at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1636) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:564) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:219) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:498)
OK, I have pushed what I have so far:I am still have problems with doing a redirect at line 114. I get the following errors:[2015-02-03 14:52:21,180] WARN org.eclipse.jetty.server.Response : Committed before 403 null[2015-02-03 14:52:21,181] WARN org.eclipse.jetty.servlet.ServletHandler : /loginjava.lang.IllegalStateException: Committedat org.eclipse.jetty.server.Response.resetBuffer(Response.java:1246)at org.eclipse.jetty.server.Response.sendError(Response.java:554)at org.eclipse.jetty.server.Response.sendError(Response.java:542)at com.google.gerrit.httpd.auth.container.HttpLoginServlet.doGet(HttpLoginServlet.java:124)
2015-02-03 21:03 GMT+01:00 Chris Harris <chris....@kitware.com>:OK, I have pushed what I have so far:I am still have problems with doing a redirect at line 114. I get the following errors:[2015-02-03 14:52:21,180] WARN org.eclipse.jetty.server.Response : Committed before 403 null[2015-02-03 14:52:21,181] WARN org.eclipse.jetty.servlet.ServletHandler : /loginjava.lang.IllegalStateException: Committedat org.eclipse.jetty.server.Response.resetBuffer(Response.java:1246)at org.eclipse.jetty.server.Response.sendError(Response.java:554)at org.eclipse.jetty.server.Response.sendError(Response.java:542)at com.google.gerrit.httpd.auth.container.HttpLoginServlet.doGet(HttpLoginServlet.java:124)I believe this error means that you tried to set a response code on the HTTP response object, after it was already sent to the client.
Hi,Thanks for the reply.listing of$GERRIT_SITE/lib --> github-oauth-2.8-SNAPSHOT.jar$GERRIT_SITE/plugins --> commit-message-length-validator.jar github.jar replication.jar reviewnotes.jargithub.jar(github-plugin-2.8-SNAPSHOT.jar) is the plugin jar.and here is the gerrit.config[gerrit]basePath = gitcanonicalWebUrl = http://canonicalWebUrl:8080[database]type = h2database = db/ReviewDB[auth]type = HTTPhttpHeader = GITHUB_USER[sendemail]smtpServer = localhost[container]user = rootjavaHome = /usr/java/jdk1.7.0_21/jre[sshd]listenAddress = *:29418[httpd]listenUrl = http://*:8080/filterClass = com.googlesource.gerrit.plugins.github.oauth.OAuthFilter[cache]directory = cache[github]url = https://github.comclientId = 12345clientSecret = 1234567890Best regards,AmeyaOn Thursday, September 26, 2013 8:19:36 PM UTC+5:30, lucamilanesio wrote:Hi Ameya,you get the error when Gerrit is using HTTP header authentication (in this case GITHUB_USER) whilst no header is provided.The GitHub integration has two components:- Plugin (which you have installed)- Servlet filter (which is possibly missing)The servlet filter is the one in this case responsible of enriching the HTTP requests with GITHUB_USER header.(not apache in this case)Can you post the listing of your $GERRIT_SITE/lib and $GERRIT_SITE/plugins directories ?HTHLuca.
On 26 Sep 2013, at 15:44, Ameya Varade <ameya....@clogeny.com> wrote:
Hi,I am trying to integrate gerrit with github. I am using this [https://gerrit.googlesource.com/plugins/github/+/62512fd78b4def9d6f3809fc700e0bca199ec24f] revision of a gerrit plugin for github [https://gerrit.googlesource.com/plugins/github/]This is the article I am referring to. http://www.packtpub.com/article/using-gerrit-with-githubDuring gerrit init the wizard prompts for gerrit integration setup which goes as expected. But it throws a configuration error if I hit the public gerrit page from the browser.I am not using apache. It's just gerrit served from jetty. Does anybody know what's wrong here?Configuration Error
Check the HTTP server's authentication settings.The HTTP server did not provide the username in the GITHUB_USER header when it forwarded the request to Gerrit Code Review.
If the HTTP server is Apache HTTPd, check the proxy configuration includes an authorization directive with the proper location, ensuring it ends with '/':
<VirtualHost hostname:8080> ServerName hostname.com ProxyRequests Off ProxyVia Off ProxyPreserveHost On <Proxy *> Order deny,allow Allow from all </Proxy><Location /login/> AuthType Basic AuthName "Gerrit Code Review" Require valid-user ... </Location>AllowEncodedSlashes On ProxyPass / http://.../ nodecode </VirtualHost>
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
The HTTP server did not provide the username in the GITHUB_USER header when it forwarded the request to Gerrit Code Review.
If the HTTP server is Apache HTTPd, check the proxy configuration includes an authorization directive with the proper location, ensuring it ends with '/':
Any help would be appreciated. I have the out jar in my $GERRIT_SITE/lib folder
ubuntu@ubuntu:~/gerrit_home$ ls lib/
gerrit-oauth-provider.jar
any help would be appreciated.
On 5 May 2022, at 02:12, Lekan Swansons <lekans...@gmail.com> wrote:Hi lucamilanesio
I am wondering if this filterClass = com.googlesource.gerrit.plugins.github.oauth.OAuthFilter is still working.
I know you're busy but if you could help I would really appreciate it.When i add this line to gerrit.config gerrit fails to start
Without this its starts but i can't log in to the github with the http method.
The HTTP server did not provide the username in the GITHUB_USER header when it forwarded the request to Gerrit Code Review.
If the HTTP server is Apache HTTPd, check the proxy configuration includes an authorization directive with the proper location, ensuring it ends with '/':
Any help would be appreciated. I have the out jar in my $GERRIT_SITE/lib folder
ubuntu@ubuntu:~/gerrit_home$ ls lib/
gerrit-oauth-provider.jar
any help would be appreciated.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/2a75111b-1503-4105-a961-0e08941a6d8an%40googlegroups.com.
On 5 May 2022, at 12:55, Lekan Swansons <lekans...@gmail.com> wrote:Hi Luca,I really appreciate you taking the time to reply.
I think might be using the wrong oauth jar. I tried building the github-jar and github-oauth from here (https://gerrit.googlesource.com/plugins/github/) with maven but to no avail.I think maybe thats why the filter isn't working. When i build the jar, i get an error saying parent pom is missing.I also tried building without parent pom but then i get some other dependency issues with some of the dependencies.
I can log in to github if i select oauth and it redirects me to github page without and issue.
I am however a bit sceptical of using this method
as I don't know if it will allow me to complete the rest of the steps to get full replication and mirroring of my github repository.
I have gerrit running on ubuntu server on a raspberry pi without apache installed.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/10f51894-75f9-4e74-a09e-14c032630989n%40googlegroups.com.
On 5 May 2022, at 13:50, Lekan Swansons <lekans...@gmail.com> wrote:No problem, please avoid top-posting and add your comments in-line with the reply, as it makes easier for others to follow the conversation.Sorry still new here my apologies.
Why don’t you use the already built jars from the Gerrit-CI? (See [1]).I tried searching for it before but i entered github instead of plugins-github so i didnt find it. I will be using this now though
That’s how OAuth works, how are you supposed to login otherwise?I understand this, I was simply trying to avoid deviating from the steps in the article i was reading in case it affects future configurations. In the article it said select http authentication method.
I guess the issue was most likely not having the correct oauth jar in the lib folder.That doesn’t have anything to do with the OAuth handshake.Can you clarify what isn’t working then?Basically gerrit doesn't work if i select http authentication method and add the filterclass. When i do bin/gerrrit.sh start, it fails.
if i comment out the filter class, it starts but i get the http_server did not provide username error.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/a67aed61-44f7-4e2d-90d2-665243dbc4dfn%40googlegroups.com.