Hi there,
We upgraded our Gerrit instance to 2.12. After also updating the
GitHub OAuth plugin to a build from the origin/stable-2.12 branch,
"Sign In" on the web page results in "Server Error"
Here is the traceback in the error_log:
[2015-12-30 16:28:52,215] [HTTP-324] WARN
org.eclipse.jetty.server.HttpChannel :
/oauth?code=d7292eabe25832f84986&state=VsiZmMMlLZAnH2O4VlUrFJZYi1Q%3D%2C%2Flogin
java.io.IOException: {"message":"You need at least read:org scope or
user scope to list your
organizations.","documentation_url":"
https://developer.github.com/v3/orgs/#list-your-organizations"}
at org.kohsuke.github.Requester.handleApiError(Requester.java:506) at
org.kohsuke.github.Requester._to(Requester.java:248) at
org.kohsuke.github.Requester.to(Requester.java:194) at
org.kohsuke.github.GitHub.getMyOrganizations(GitHub.java:340) at
com.googlesource.gerrit.plugins.github.oauth.OAuthWebFilter.login(OAuthWebFilter.java:128)
at com.googlesource.gerrit.plugins.github.oauth.OAuthWebFilter.doFilter(OAuthWebFilter.java:89)
at com.googlesource.gerrit.plugins.github.oauth.OAuthFilter.doFilter(OAuthFilter.java:86)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499) at
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:745) Caused by:
java.io.IOException: Server returned HTTP response code: 403 for URL:
https://api.github.com/user/orgs at
sun.reflect.GeneratedConstructorAccessor120.newInstance(Unknown
Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at
sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1676)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1674)
at java.security.AccessController.doPrivileged(Native Method) at
sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1672)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1245)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at org.kohsuke.github.Requester.parse(Requester.java:461) at
org.kohsuke.github.Requester._to(Requester.java:227) ... 21 more
Caused by: java.io.IOException: Server returned HTTP response code:
403 for URL:
https://api.github.com/user/orgs at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1627)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
at org.kohsuke.github.Requester.parse(Requester.java:457) ... 22 more
[2015-12-30 16:28:52,215] [HTTP-324] WARN
org.eclipse.jetty.server.HttpChannel : Could not send response error
500: java.io.IOException: {"message":"You need at least read:org scope
or user scope to list your
organizations.","documentation_url":"
https://developer.github.com/v3/orgs/#list-your-organizations"}
Any ideas on how to proceed?
Thanks and happy New Year!
Matt