Better handling of repository configuration errors

Fixes https://www.pivotaltracker.com/story/show/73575994