RepositoryConfigDto GetConfigFromRemotes(IEnumerable<string> remotes) {
RepositoryConfigDto config = null;
foreach (var r in remotes) {
try {
config = TryGetConfigFromRemote(r);
break;
} catch (Exception e) {
this.Logger().FormattedWarnException(e, "failure to retrieve config.json");
}
}
if (config == null)
throw new Exception("Could not get a valid config from any remote");
return config;
}