<p>Can someone give an example of how to use the <code>gitRepo</code> type of volume in <strong>Kubernetes</strong>?</p>

<p>The doc says it's a plugin, not sure what that means. Could not find an example anywhere and i don't know the proper syntax.</p>

<p>especially is there parameters to pull a specific branch, use credentials (username, password, or SSH key) etc...</p>

<p>EDIT:
Going through the Kubernetes code this is what I figured so far:</p>

<pre><code>- name: data
  gitRepo:
    repository: "git repo url"
    revision:   "hash of the commit to use"
</code></pre>

<p>But can't seen to make it work, and not sure how to troubleshoot this issue</p>

<p><strong>UPDATE</strong>:</p>

<p>gitRepo is now deprecated</p>

<p><a href="https://github.com/kubernetes/kubernetes/issues/60999" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/60999</a></p>

<p><strong>ORIGINAL ANSWER</strong>:</p>

<p>going through the code this is what i figured:</p>

<pre><code>- name: data
  gitRepo:
    repository: "git repo url"
    revision:   "hash of the commit to use"
</code></pre>

<p>after fixing typos in my mountPath, it works fine.</p>
