<p>Hi i'm facing this issue when my pod using a gitRepo volume, from the book <strong>Kubernetes In action</strong> example</p>
<p>here is my deployment file</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata: 
  name: gitrepo-vol-deploy
  namespace: book 
spec:
  replicas: 1
  selector:
    matchLabels:
      app: git-repo-as-vol-1
      type: volumes
  template:
    metadata:
      labels: 
        app: git-repo-as-vol-1
        type: volumes
    spec: 
      containers:
      - image: nginx
        name: web-server
        volumeMounts:
        - name: html
          mountPath: /usr/share/nginx/html
          readOnly: true
        ports:
        - containerPort: 80
          protocol: TCP
      volumes:
      - name: html
        gitRepo:
          repository: git@github.com:xxxxxx/kubia-website-example.git
          revision: master
          directory: .

</code></pre>
<p>My pods status</p>
<pre><code>k8s@GSG1PM-FT1057:~$ n book 
NAME                                 READY   STATUS              RESTARTS      AGE
deploy-kubia-app-7d6fb9cb8-rvrrv     1/1     Running             4 (14h ago)   15d
gitrepo-vol-deploy-b59f686cf-hzlts   0/1     ContainerCreating   0             30m
rs-kubia-app-6jjpm                   1/1     Running             4 (14h ago)   15d
vol-1-7956876664-5f48q               2/2     Running             0             93m
</code></pre>
<p>Here is my pod description</p>
<pre><code>Containers:
  web-server:
    Container ID:   
    Image:          nginx
    Image ID:       
    Port:           80/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Environment:    &lt;none&gt;
    Mounts:
      /usr/share/nginx/html from html (ro)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-bln48 (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
Volumes:
  html:
    Type:        GitRepo (a volume that is pulled from git when the pod is created)
    Repository:  git@github.com:xxxxxx/kubia-website-example.git
    Revision:    master
  kube-api-access-bln48:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       &lt;nil&gt;
    DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              &lt;none&gt;
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason       Age                  From               Message
  ----     ------       ----                 ----               -------
  Normal   Scheduled    11m                  default-scheduler  Successfully assigned book/gitrepo-vol-deploy-b59f686cf-hzlts to minikube
  Warning  FailedMount  7m12s                kubelet            Unable to attach or mount volumes: unmounted volumes=[html], unattached volumes=[kube-api-access-bln48 html]: timed out waiting for the condition
  Warning  FailedMount  74s (x13 over 11m)   kubelet            MountVolume.SetUp failed for volume &quot;html&quot; : failed to exec 'git clone -- git@github.com:xxxxx/kubia-website-example.git .': : executable file not found in $PATH
  Warning  FailedMount  22s (x4 over 9m27s)  kubelet            Unable to attach or mount volumes: unmounted volumes=[html], unattached volumes=[html kube-api-access-bln48]: timed out waiting for the condition
</code></pre>
<p>in the pod description events it stating this, can anyone help me where i'm wrong? Thanks in advance.</p>
<pre><code>Warning  FailedMount  7m12s                kubelet            Unable to attach or mount volumes: unmounted volumes=[html], unattached volumes=[kube-api-access-bln48 html]: timed out waiting for the condition
</code></pre>
<p>Using a Git repository as the starting point for a volume.</p>

Praveen
<p>It seems the root cause is actually written in the Events. When doing git clone of your repo it says:</p>
<p>&quot;executable file not found in $PATH&quot;</p>
<p>The nginx image you are using doesn't contain the git executable, so you could instead create your own Docker image based on nginx:</p>
<pre><code>FROM nginx 

RUN apt update &amp;&amp; apt install -y git
</code></pre>
