test if the repo exists, only then escalate privileges
test if the repo exists, only then escalate privileges