我正在整合Gerrit和Github Oauth,这是我的gerrit配置:
java -jar ../gerrit.war init -d .
Using secure store: com.google.gerrit.server.securestore.DefaultSecureStore
*** Gerrit Code Review 2.15.2
***
*** Git Repositories
***
Location of Git repositories [git]:
*** SQL Database
***
Database server type [mysql]:
Server hostname [localhost]:
Server port [(mysql default)]:
Database name [reviewdb]:
Database username [gerrit]:
Change gerrit's password [y/N]?
*** Index
***
Type [lucene/?]:
*** User Authentication
***
Authentication method [http/?]:
Get username from custom HTTP header [Y/n]?
Username HTTP header [GITHUB_USER]:
SSO logout URL [/oauth/reset]:
Enable signed push support [y/N]?
*** Review Labels
***
Install Verified label [y/N]?
*** Email Delivery
***
SMTP server hostname [localhost]:
SMTP server port [(default)]:
SMTP encryption [none/?]:
SMTP username :
*** Container Process
***
Run as [gerrit]:
Java runtime [/opt/share/jre1.8.0_171]:
Upgrade ./bin/gerrit.war [Y/n]?
Copying gerrit.war to ./bin/gerrit.war
*** SSH Daemon
***
Listen on address [*]:
Listen on port [29418]:
*** HTTP Daemon
***
Behind reverse proxy [y/N]?
Use SSL (https://) [Y/n]?
Listen on address [*]:
Listen on port [8080]:
Canonical URL [https://gerrit.removed-domain-name.com]:
Create new self-signed SSL certificate [Y/n]?
*** Cache
***
Delete cache file /var/gerrit/cache/conflicts.h2.db [y/N]? y
Delete cache file /var/gerrit/cache/mergeability.h2.db [y/N]? y
Delete cache file /var/gerrit/cache/oauth_tokens.h2.db [y/N]? y
Delete cache file /var/gerrit/cache/web_sessions.h2.db [y/N]? y
Delete cache file /var/gerrit/cache/change_kind.h2.db [y/N]? y
Delete cache file /var/gerrit/cache/diff_intraline.h2.db [y/N]? y
Delete cache file /var/gerrit/cache/git_tags.h2.db [y/N]? y
Delete cache file /var/gerrit/cache/diff.h2.db [y/N]? y
Delete cache file /var/gerrit/cache/diff_summary.h2.db [y/N]? y
Delete cache file /var/gerrit/cache/github-plugin.groups.h2.db [y/N]? y
*** Plugins
***
Installing plugins.
Install plugin commit-message-length-validator version v2.15.2 [Y/n]?
commit-message-length-validator v2.15.2 is already installed, overwrite it [Y/n]?
Updated commit-message-length-validator to v2.15.2
Install plugin download-commands version v2.15.2 [Y/n]?
download-commands v2.15.2 is already installed, overwrite it [Y/n]?
Updated download-commands to v2.15.2
Install plugin hooks version v2.15.2 [Y/n]?
hooks v2.15.2 is already installed, overwrite it [Y/n]?
Updated hooks to v2.15.2
Install plugin replication version v2.15.2 [Y/n]?
replication v2.15.2 is already installed, overwrite it [Y/n]?
Updated replication to v2.15.2
Install plugin reviewnotes version v2.15.2 [Y/n]?
reviewnotes v2.15.2 is already installed, overwrite it [Y/n]?
Updated reviewnotes to v2.15.2
Install plugin singleusergroup version v2.15.2 [Y/n]?
singleusergroup v2.15.2 is already installed, overwrite it [Y/n]?
Updated singleusergroup to v2.15.2
Initializing plugins.
*** GitHub Integration
***
GitHub URL [https://github.com]:
GitHub API URL [https://api.github.com]:
NOTE: You might need to configure a proxy using http.proxy if you run Gerrit behind a firewall.
*** GitHub OAuth registration and credentials
***
Register Gerrit as GitHub application on:
https://github.com/settings/applications/new
Settings (assumed Gerrit URL: https://gerrit.removed-domain-name.com)
* Application name: Gerrit Code Review
* Homepage URL: https://gerrit.removed-domain-name.com
* Authorization callback URL: https://gerrit.removed-domain-name.comoauth
After registration is complete, enter the generated OAuth credentials:
GitHub Client ID [65e46e2f946f5b888888]:
Change clientSecret [y/N]?
Gerrit OAuth implementation [http/?]:
HTTP Authentication Header [GITHUB_USER]:
*** Experimental features
***
Enable any experimental features [y/N]?
Initialized /var/gerrit
还在相应位置添加了两个jar文件:
github-oauth/target/github-oauth-.jar
github-plugin/target/github-plugin-.jar
链接:https://gerrit.googlesource.com/plugins/github/+/master/README.md
当我尝试通过github登录时,它使用github进行身份验证,但回调给出了“服务器错误”。登录error_log说:
[HTTP-68] ERROR com.google.gerrit.pgm.http.jetty.HiddenErrorHandler : Error in GET /login?final=true
org.eclipse.jgit.errors.RepositoryNotFoundException: repository not found: /var/gerrit/git/All-Users
ls -la git返回空。
请帮帮我。