[users at bb.net] How to configure HTPasswdAuth
    Chris Spencer 
    chrisspen at gmail.com
       
    Mon Jan  4 19:14:38 UTC 2016
    
    
  
How do you enable htpasswdauth on the Buildbot web server?
The docs (http://docs.buildbot.net/current/manual/cfg-statustargets.html)
confusingly say I should delete my entire WebStatus instance and replace it
with something like:
   auth = util.HTPasswdAuth('/path/to/htpasswd')
which doesn't work.
So I tried keeping my WebStatus and just replacing the Authz.auth variable,
like:
    htpasswd_auth = auth.HTPasswdAuth(os.path.join(BASE_DIR, '../htpasswd'))
    authz_cfg=authz.Authz(
        #auth=auth.BasicAuth([("admin", "mypassword")]),
        auth=htpasswd_auth,
        gracefulShutdown = False,
        forceBuild = 'auth',
        forceAllBuilds = 'auth',
        pingBuilder = False,
        stopBuild = True,
        stopAllBuilds = True,
        cancelPendingBuild = True,
    )
    c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
This doesn't throw any errors and the server comes back up, but now I can't
login and there's still no htpasswd prompt. What am I doing wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20160104/e686f200/attachment.html>
    
    
More information about the users
mailing list