我在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:
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身份验证方面的新手)
发布于 2018-07-05 11:16:41
http://gitblit.com/setup_authentication.html Gitblit仅支持以下authtype:
LDAP authentication
Windows authentication
PAM authentication
Htpasswd authentication
HTTP header authentication
Redmine auhentication
Salesforce.com authentication
Servlet container authentication但是您的auth类型是Digest,您可以尝试通过以下步骤将auth类型切换为htpasswd:
AuthType Basic AuthName "gerrit“AuthUserFile /etc/ apache2 /.htpasswd要求有效-user
sudo服务重启
如果还有其他问题,请告诉我。希望能对你有所帮助。啊哈
https://stackoverflow.com/questions/46212377
复制相似问题