首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Gitblit作为Gerrit中的插件进行身份验证

使用Gitblit作为Gerrit中的插件进行身份验证
EN

Stack Overflow用户
提问于 2017-09-14 14:52:07
回答 1查看 140关注 0票数 0

我在ubuntu上安装了Gerrit,它使用apache2进行HTTP身份验证。作为一个查看器,我们希望使用Gitblit作为Gerrit中的一个插件。我已经在这里找到了插件,here,然后我按照安装说明去了那里。

由于Gerrit中的所有其他插件都可以正常工作,比如blabla.com/gerrit/ plugins /gitiles/或其他一些插件,所以当我试图浏览到blabla.com/gerrit/plugins/gitblit/ (还有documentation文件夹)时,总是会收到一个登录请求。

我认为我在apache2配置中有任何错误或缺失,但到目前为止我还没有找到正确的配置。

在为Gerrit安装apache2之后(由this指南),我没有接触apache2.conf,我只是在apache2的mods-enable子文件夹中添加了一个包含以下内容的gerrit.conf:

代码语言:javascript
复制
ProxyPass           /gerrit  http://localhost:8081/gerrit nocanon
ProxyPassReverse    /gerrit  http://localhost:8081/gerrit nocanon
ProxyRequests       Off

<Proxy http://localhost:8081/gerrit>
  Order deny,allow
  Allow from all
</Proxy>

<Location /gerrit>
  AuthType Digest
  AuthName "gerrit"
  AuthUserFile /etc/apache2/.htdigest
  Require valid-user
</Location>

当我使用我们的地址/ Gerrit访问gerrit时,系统会询问我最初使用htdigest添加的权限。

知道出什么问题了吗?为什么Gitblit被要求登录而不接受?(我是Apache身份验证方面的新手)

EN

回答 1

Stack Overflow用户

发布于 2018-07-05 11:16:41

http://gitblit.com/setup_authentication.html Gitblit仅支持以下authtype:

代码语言:javascript
复制
LDAP authentication
Windows authentication
PAM authentication
Htpasswd authentication
HTTP header authentication
Redmine auhentication
Salesforce.com authentication
Servlet container authentication

但是您的auth类型是Digest,您可以尝试通过以下步骤将auth类型切换为htpasswd:

  1. 添加一个新的身份验证文件sudo htpasswd -c /etc/apache2/.htpasswd将您的gerrit.conf添加到/etc/apache2/...

AuthType Basic AuthName "gerrit“AuthUserFile /etc/ apache2 /.htpasswd要求有效-user

  • restart apache2

sudo服务重启

如果还有其他问题,请告诉我。希望能对你有所帮助。啊哈

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46212377

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档