Adapted setup to work with public-facing repositories.

We still assume you are inside the RAL firewall.  Some tidying still needed.