Apache 是否可以在反向代理后使用Gerrit 2.10的Github插件
我有一个gerrit实例正在运行。我已经构建了github插件。但我想知道的是,gerrit 2.10在反向代理后运行gerrit时是否支持GitHub插件?如果是,我应该使用什么身份验证方法 现在我的gerrit.conf看起来像:Apache 是否可以在反向代理后使用Gerrit 2.10的Github插件,apache,github,reverse-proxy,gerrit,Apache,Github,Reverse Proxy,Gerrit,我有一个gerrit实例正在运行。我已经构建了github插件。但我想知道的是,gerrit 2.10在反向代理后运行gerrit时是否支持GitHub插件?如果是,我应该使用什么身份验证方法 现在我的gerrit.conf看起来像: [gerrit] basePath = /home/gerrit2/Repos/Projects canonicalWebUrl = http://www.matthewh.me/gerrit/ [database] type = mysq
[gerrit]
basePath = /home/gerrit2/Repos/Projects
canonicalWebUrl = http://www.matthewh.me/gerrit/
[database]
type = mysql
hostname = localhost
database = reviewdb
username = gerrit2
[index]
type = LUCENE
[auth]
type = OPENID_SSO
openIdDomain = @matthewh.me
openIdSsoUrl = https://www.google.com/accounts/o8/id
[sendemail]
smtpServer = smtp.gmail.com
smtpServerPort = 465
smtpEncryption = SSL
sslVerify = false
smtpUser = matthew.hoggan@matthewh.me
smtpPass = <my password>
[container]
user = gerrit2
javaHome = /home/gerrit2/Devel/jdk1.7.0_60/jre
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = proxy-http://www.matthewh.me:8081/gerrit/
[cache]
directory = cache
是的,这是可能的
我们将要安装它们
github 2.10-SNAPSHOT&&
下载github oauth*.jar,用于
正在进行身份验证的Gerrit用户将GitHub OAuth筛选器安装到
Gerrit站点目录下的Gerrit库/lib
GitHub OAuth JAR文件需要复制到Gerrit/lib目录;这是允许Gerrit使用它过滤所有HTTP请求和强制执行GitHub三步身份验证过程所必需的:
下载github插件*.jar,Gerrit插件,用于与github存储库和pull请求集成
将GitHub插件安装到Gerrit站点目录下的Gerrit plugins/plugins中
GitHub插件包括对整个应用程序的额外支持
配置、高级GitHub存储库复制和
将拉取请求集成到代码审查过程中
将Gerrit注册为GitHub OAuth应用程序
在使用Gerrit init之前,我们需要告诉GitHub将Gerrit作为合作伙伴应用程序信任。这是通过生成一个ClientId/ClientSecret对来完成的,该对与用于启动3步OAuth身份验证的确切Gerrit URL相关联
我们可以通过URL在GitHub中注册一个新的应用程序,其中请求以下三个字段:
应用程序名称:应用程序的逻辑名称
有权访问GitHub,例如Gerrit。
主URL:用于重定向到GitHub OAuth身份验证的Gerrit规范web URL,例如。
回调URL:当OAuth运行时GitHub应该重定向到的URL
例如,身份验证已成功完成,
.
你可以在我的博客上查看完整的教程
放入etc/gerrit.config
[auth]
type = HTTP
httpHeader = GITHUB_USER
httpDisplayNameHeader = GITHUB_NAME
httpEmailHeader = GITHUB_EMAIL
loginUrl = /login
loginText = GitHub Sign-in
registerPageUrl = /plugins/github-plugin/static/account.html
gitBasicAuth = true