title: Docker Desktop for Windows: Where should I place SSH private key in a windows container for git?
body: <p>I am using the image <code>microsoft/windowsservercore</code> to create a windows container running on Docker for windows on Windows 10 Desktop. I have installed <code>git</code> in this container using <code>chocolatey</code> like this:</p>
  
  <pre><code>FROM microsoft/windowsservercore
  
  # some other steps go here
  
  RUN @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" &amp;&amp; SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
  
  RUN choco install git -params '"/GitAndUnixToolsOnPath"' -y
  
  EXPOSE 8080  
  
  # some other steps go here
  </code></pre>
  
  <p>Git is installed fine in the container and if I open the <code>CMD</code> prompt of the container like this:</p>
  
  <pre><code>docker exec -it mycontainer cmd
  </code></pre>
  
  <p>I can access the <code>git</code> command. However, I need to run <code>git clone</code> and for that I either need to place my SSH keys in some directory to be picked by <code>git</code> or I will have to use <code>https</code>. When I use <code>https</code>, it gets stuck at <code>cloning repository</code> step forever. Not sure why that happens. I can ping <code>bitbucket.org</code> from the container and <code>git clone</code> works fine on the host machine using <code>https</code>. Other thing I need to understand is where does <code>git</code> look for SSH key so that I can create one and copy to that directory ?</p>