This error handling is getting dirty, with each case dealing with every other case. Would be cleaner if we could ask for the type of the current repo and simply compare.