Enable private repos - merge conflict fixed

Hi there, a previous pull request was created that adds support for private registries. I've confirmed the fix worked, but the said pull request had merge conflicts. Here's a conflict free merge request.