Oops... cd into clone so it's actually used!!
set_remotes *before* ensure_clean_repository, so we get the config values