Add support for private repos

This is a quick way that works. There is room for improvement for sure.