mworster@npusdbnpbld01v:~/github$ git clone https://gerrit.googlesource.com/plugins/github
Cloning into 'github'...
remote: Total 3014 (delta 635), reused 3014 (delta 635)
Receiving objects: 100% (3014/3014), 1.01 MiB | 1.68 MiB/s, done.
Resolving deltas: 100% (635/635), done.
mworster@npusdbnpbld01v:~/github$ cd github/
mworster@npusdbnpbld01v:~/github/github$ mvn install
Downloading: http://gerritforge.com/snapshot//com/google/gerrit/gerrit-plugin-api/2.12-SNAPSHOT/gerrit-plugin-api-2.12-SNAPSHOT.pom
1K downloaded (gerrit-plugin-api-2.12-SNAPSHOT.pom)
[WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for com/google/gerrit/gerrit-plugin-api/2.12-SNAPSHOT/gerrit-plugin-api-2.12-SNAPSHOT.pom - IGNORING
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error reading /home/mworster/.m2/repository/com/google/gerrit/gerrit-plugin-api/2.12-SNAPSHOT/gerrit-plugin-api-2.12-SNAPSHOT.jar; error in opening zip file
[ERROR] error reading /home/mworster/.m2/repository/com/google/gerrit/gerrit-plugin-api/2.12-SNAPSHOT/gerrit-plugin-api-2.12-SNAPSHOT.jar; error in opening zip file
[ERROR] /home/mworster/github/github/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthGitFilter.java:[19,30] cannot find symbol
symbol: class MoreObjects
location: package com.google.common.base
[ERROR] /home/mworster/github/github/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthGitFilter.java:[23,40] package com.google.gerrit.server.account does not exist
[ERROR] /home/mworster/github/github/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthProtocol.java:[7,23] package com.google.gson does not exist
[ERROR] /home/mworster/github/github/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthProtocol.java:[40,47] package com.google.gerrit.extensions.auth.oauth does not exist
[ERROR] /home/mworster/github/github/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthProtocol.java:[41,47] package com.google.gerrit.extensions.auth.oauth does not exist
...
mworster@npusdbnpbld01v:~/github/github$ java -version
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.12.04.1)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)
mworster@npusdbnpbld01v:~/github/github$ javac -version
javac 1.7.0_79
mworster@npusdbnpbld01v:~/github/github$ mvn -version
Apache Maven 2.2.1 (rdebian-8)
Java version: 1.7.0_79
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "3.13.0-32-generic" arch: "amd64" Family: "unix"
On 18 Aug 2015, at 21:13, Mike Worster <mike.w...@gmail.com> wrote:I am trying to get a Gerrit server setup using the authentication from a local Enterprise GitHub server and I'm running into issues. I've read to do this I need a few plugins to get the OAuth setup,
and also that I need to build these from source.
I've tried a number of different sites with slightly different information, but so far they've all ended up the same results... build failure.
I've never set anything like this up before, only briefly used Apache, and never used maven or done any sort of web administration so there is a good chance I'm missing something obvious, but I just don't know what to look for.
The most recent tutorial I was trying to follow was here: https://www.packtpub.com/books/content/using-gerrit-github
The log of my efforts is attached, the instructions seemed pretty simple: clone, enter the directory, build. So I did:mworster@npusdbnpbld01v:~/github$ git clone https://gerrit.googlesource.com/plugins/github
Cloning into 'github'...
remote: Total 3014 (delta 635), reused 3014 (delta 635)
Receiving objects: 100% (3014/3014), 1.01 MiB | 1.68 MiB/s, done.
Resolving deltas: 100% (635/635), done.
mworster@npusdbnpbld01v:~/github$ cd github/
mworster@npusdbnpbld01v:~/github/github$ mvn install
it downloaded a lot of packages, I noticed one checksum error:Downloading: http://gerritforge.com/snapshot//com/google/gerrit/gerrit-plugin-api/2.12-SNAPSHOT/gerrit-plugin-api-2.12-SNAPSHOT.pom
1K downloaded (gerrit-plugin-api-2.12-SNAPSHOT.pom)
[WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for com/google/gerrit/gerrit-plugin-api/2.12-SNAPSHOT/gerrit-plugin-api-2.12-SNAPSHOT.pom - IGNORING
There were a couple of warnings thrown and a whole slew of errors. Some of them tied to the incorrectly downloaded plugins:[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error reading /home/mworster/.m2/repository/com/google/gerrit/gerrit-plugin-api/2.12-SNAPSHOT/gerrit-plugin-api-2.12-SNAPSHOT.jar; error in opening zip file
[ERROR] error reading /home/mworster/.m2/repository/com/google/gerrit/gerrit-plugin-api/2.12-SNAPSHOT/gerrit-plugin-api-2.12-SNAPSHOT.jar; error in opening zip file
[ERROR] /home/mworster/github/github/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthGitFilter.java:[19,30] cannot find symbol
symbol: class MoreObjects
location: package com.google.common.base
[ERROR] /home/mworster/github/github/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthGitFilter.java:[23,40] package com.google.gerrit.server.account does not exist
[ERROR] /home/mworster/github/github/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthProtocol.java:[7,23] package com.google.gson does not exist
[ERROR] /home/mworster/github/github/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthProtocol.java:[40,47] package com.google.gerrit.extensions.auth.oauth does not exist
[ERROR] /home/mworster/github/github/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthProtocol.java:[41,47] package com.google.gerrit.extensions.auth.oauth does not exist
...
I did some searching on various errors here, but there suggestions about having maven clean or manually cleaning the .m2 directory, both of which do nothing. Other suggestions I found suggested downloading the precompiled files, but I can't seem to find any.
I'm thinking my issue is the .pom file which didn't meet the checksum test, that doesn't seem kosher to me... but I could be off basis.
Does anyone with more experience have a better answer? Or a better set of instructions?
-Mikemworster@npusdbnpbld01v:~/github/github$ java -version
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.12.04.1)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)
mworster@npusdbnpbld01v:~/github/github$ javac -version
javac 1.7.0_79
mworster@npusdbnpbld01v:~/github/github$ mvn -version
Apache Maven 2.2.1 (rdebian-8)
Java version: 1.7.0_79
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "3.13.0-32-generic" arch: "amd64" Family: "unix"
--
--
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.
<gerrit_git_api_log.txt>
It looks like you're building the master branch of the plugin and it's using an incompatible build of the API snapshot.
The quick solution would be to check out the stable-2.11 branch and build that, which will use the official released API artifacts.
If you intentionally built master because you've installed gerrit built from master, then you'll have to locally build the API with 'buck build api_install' in the gerrit source tree.
mworster@npusdbnpbld01v:/opt/gerrit2/review_site$ sudo ./bin/gerrit.sh start
Starting Gerrit Code Review: FAILED
Error injecting constructor, java.lang.NullPointerException: GitHub `clientSecret` must be provided
mworster@npusdbnpbld01v:/opt/gerrit2/review_site/etc$ sudo cat secure.config
[auth]
registerEmailPrivateKey = F9cqoYrb8....0mwsVTfHQLecSeo4A=
restTokenPrivateKey = qbsDHSKk3E7b....DrdfJg/X9uuz8jjg=
[github]
clientSecret = b82b6abb0f....111cb0982e
On 19 Aug 2015, at 09:20, Sébastien Douche <s...@nmeos.net> wrote:
On Wed, 19 Aug 2015, at 10:06, Luca Milanesio wrote:Hi Sebastien,
Hi againI think you misread the GHE documentation: they say that the “GitHub
OAuth” will be removed as GHE authentication SSO method … but NOT that
GHE will stop being an OAuth 2.0 provider :-)
Sorry, I was not clear enough. I would say how to use GHE auth with
Oauth2 token or server/client? I tried w/o success. Can you paste a
correct gerrit.config?
Thanks.
--
Sébastien Douche <s...@nmeos.net>
Twitter: @sdouche
http://douche.name
[gerrit]
basePath = git
canonicalWebUrl = http://npusdbnpbld01v.emrsn.org/
[database]
type = mysql
hostname = localhost
database = gerritdb
username = gerrit2
[index]
type = LUCENE
[auth]
trustedOpenID = https://www.google.com/accounts/o8/id?id=
type = HTTP
httpHeader =
GITHUB_USER
httpExternalIdHeader = GITHUB_OAUTH_TOKEN
loginUrl = /login
loginText = Sign-in with GitHub
registerPageUrl = "/
#/register"
logoutUrl = /oauth/reset
[sendemail]
smtpServer = localhost
[container]
user = gerrit2
javaHome = /usr/lib/jvm/java-7-openjdk-amd64/jre
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = proxy-http://*:8081/
filterClass = com.googlesource.gerrit.plugins.github.oauth.OAuthFilter
[cache]
directory = cache
[github]
url = https://npusgithub.emrsn.org/
apiUrl = https://api.npusgithub.emrsn.org/
clientId = 7d72....a7d49
clientSecret = b82b6....0982e
Enter code here...
[ERROR] /home/mworster/github/github/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthGitFilter.java:[23,40] packagecom.google.gerrit.server.account does not exist
[ERROR] /home/mworster/github/github/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthProtocol.java:[7,23] packagecom.google.gson does not exist
[ERROR] /home/mworster/github/github/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthProtocol.java:[40,47] packagecom.google.gerrit.extensions.auth.oauth does not exist
[ERROR] /home/mworster/github/github/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthProtocol.java:[41,47] packagecom.google.gerrit.extensions.auth.oauth does not exist
...
http://npusdbnpbld01v.emrsn.org/oauth?code=ab3f3744a2cd2fab62ab&state=jN0j85Sd_gtW5YNi5oF4Iz5Lmh4%3D%2C%2Flogin
Not Found
The requested URL /oauth was not found on this server.
...
*** GitHub OAuth registration and credentials
***
Register Gerrit as GitHub application on:
https://npusgithub.emrsn.org//settings/applications/new
Settings (assumed Gerrit URL: http://npusdbnpbld01v.emrsn.org/)
* Application name: Gerrit Code Review
* Homepage URL: http://npusdbnpbld01v.emrsn.org/
* Authorization callback URL: http://npusdbnpbld01v.emrsn.org/oauth
After registration is complete, enter the generated OAuth credentials:
GitHub Client ID [7d729dbab9b9a1ba7d49]:
Change GitHub Client Secret [y/N]?
Gerrit OAuth implementation [HTTP/?]:
HTTP Authentication Header [GITHUB_USER]:
[httpd]
listenUrl = proxy-http://*:8081/
filterClass = com.googlesource.gerrit.plugins.github.oauth.OAuthFilter
...