Password protected CruiseControl.rb with git support
Here is how I setup my internet accessible CruiseControl.rb server and password protected it, using apache on MacOS.
As I use Git for VCS so I installed the version from GitHub that supports it. This appears to be the most actively developed version as far as I can tell.
After cloning it to ~/cruisecontrol.rb I wrote a startup script for the server that gets it to bind only to interface 127.0.0.1. The key is the –binding option:
#!/bin/bash cd ~/cruisecontrol.rb ./cruise start --binding=127.0.0.1 --port=3333 --daemon
Then I setup an apache virtual server with a reverse proxy for / to localhost:3333, and set it to be password protected:
...
ProxyPass / balancer://balancer-group/
ProxyPassReverse / balancer://balancer-group/
<Proxy "balancer://balancer-group">
BalancerMember http://127.0.0.1:3333 loadfactor=100
AuthType Basic
AuthName "cc.sampierson.net private"
Require user sam
</Proxy>
...MacOS Apache integrates AuthType Basic with its own authorization system so you don’t need to tell it about an htpasswd file.
