String remoteUrl = "http://localhost:" + server.getConnectors()[0].getLocalPort() + "/auth-test/";
String repoId = "testSiteWithAuth";
RepositoryRegistry repoRegistry = this.lookup(RepositoryRegistry.class);
TemplateProvider templateProvider =
this.lookup(TemplateProvider.class, DefaultRepositoryTemplateProvider.PROVIDER_ID);
Maven2ProxyRepositoryTemplate template =
(Maven2ProxyRepositoryTemplate) templateProvider.getTemplateById("default_proxy_release");
template.getCoreConfiguration().getConfiguration(true).setId(repoId);
template.getCoreConfiguration().getConfiguration(true).setName(repoId + "-name");
template.getCoreConfiguration().getConfiguration(true).setIndexable(false); // disable index
template.getCoreConfiguration().getConfiguration(true).setSearchable(false); // disable index