See, How to source a theme from a private git repository
Edit:
Oh. That’s such a crazy idea that I didn’t understand the question.
Like Matt said, the right approach is to develop a plugin. If you want it in a private repo, then you can follow my directions above.