<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>This is a sample application I used:</p>

<pre><code>{
  "kind": "ReplicationController",
  "apiVersion": "v1",
  "metadata": {
    "name": "tess.io",
    "labels": {
      "name": "tess.io"
    }
  },
  "spec": {
    "replicas": 3,
    "selector": {
      "name": "tess.io"
    },
    "template": {
      "metadata": {
        "labels": {
          "name": "tess.io"
        }
      },
      "spec": {
        "containers": [
          {
            "image": "tess/tessio:0.0.3",
            "name": "tessio",
            "ports": [
              {
                "containerPort": 80,
                "protocol": "TCP"
              }
            ],
            "volumeMounts": [
              {
                "mountPath": "/tess",
                "name": "tess"
              }
            ]
          }
        ],
        "volumes": [
          {
            "name": "tess",
            "gitRepo": {
              "repository": "https://&lt;TOKEN&gt;:x-oauth-basic@github.com/tess/tess.io"
            }
          }
        ]
      }
    }
  }
}
</code></pre>

<p>And you can use the revision too. </p>

<p>PS: The repo above does not exist anymore. </p>
