seperated sync_repository from prepare_environment func