如何禁用jenkins的基本http身份验证

时间:2015-04-09 05:37:10

标签: jenkins

我的jenkins版本:1.608,它在nginx后面运行。

我刚从portage安装了jenkins,然后转到Manage Jenkins> Configure Global Security>启用Enable security>选择Jenkins’ own user database>启用Allow users to sign up>点击Save按钮

然后页面刷新,jenkins要求我使用基本的http身份验证登录,但我还没有添加任何用户,我无法访问注册页面。

我可以在useSecurity中停用/var/lib/jenkins/home/config.xml,但我想使用Jenkins’ own user database

我从未在Manage Users页面找到Manage Jenkins

2 个答案:

答案 0 :(得分:1)

您应该在config.xml中删除authorizationStrategy和securityRealm。将“useSecurity”保留为“true”。

答案 1 :(得分:0)

我帮助文件/var/cache/jenkins/war/WEB-INF/security/SecurityFilters.groovy注释掉了块

bean(BasicHeaderProcessor) {
            // if basic authentication fails (which only happens incorrect basic auth credential is sent),
            // respond with 401 with basic auth request, instead of redirecting the user to the login page,
            // since users of basic auth tends to be a program and won't see the redirection to the form
            // page as a failure
             authenticationEntryPoint = bean(BasicProcessingFilterEntryPoint) {
                realmName = "Jenkins"
            }
        },