<p>Has anyone mounted a private GitHub repository into a kubernetes pod volume?</p>

<p>What is the best way to achieve this?
I thought of two possible ways:</p>

<ol>
<li>Using user / password in HTTPS repository URL</li>
<li>Using private SSH key on the machine</li>
</ol>

<p>I like the second better, but I couldn't figure which user is pulling the repository to puts the appropriate SSH configuration for it.</p>

<p>Any thoughts?</p>

<p>GitHub allows cloning repositories using an OAuth token in https URLs as such:</p>

<p><code>$ git clone https://$GH_TOKEN@github.com/owner/repo.git
</code></p>

<p>see
<a href="https://help.github.com/articles/creating-an-access-token-for-command-line-use/" rel="nofollow">https://help.github.com/articles/creating-an-access-token-for-command-line-use/</a></p>
