title: cloning a private git repo in jenkins, bitbucket
body: <p>I am having errors cloning a private bitbucket repo with Jenkins.  I've followed the debug steps from here:</p>
  
  <p><a href="https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin" rel="nofollow">https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin</a></p>
  
  <ol>
  <li>Create ssh keys Added ssh key to bitbucket as a deployment key</li>
  <li>Successfully cloned that repo with that ssh key in my user account on the server </li>
  <li>Copied keys and known hosts into C:\Windows\SysWOW64\config\systemprofile.ssh </li>
  <li>Checked that the Jenkins service was running under local system account </li>
  <li>Start build and then -> Error</li>
  </ol>
  
  <p>What am I doing wrong?</p>
  
  <pre><code>ERROR: Error cloning remote repo 'origin' : Could not clone ssh:///git@bitbucket.org:myUsername/myRepo.git
      hudson.plugins.git.GitException: Could not clone ssh:///git@bitbucket.org:myUsername/myRepo.git
      Caused by: hudson.plugins.git.GitException: Command "git.exe clone --progress -o origin ssh:///git@bitbucket.org:myUsername/myRepo.git C:\Program Files (x86)\Jenkins\workspace\myProject" returned status code 128:
      stdout: Cloning into 'C:\Program Files (x86)\Jenkins\workspace\myProject'...
  
      stderr: ssh: connect to host  port 22: Bad file number
      fatal: The remote end hung up unexpectedly
  </code></pre>