title: access denied when cloning local git from Jenkins
body: <p>I'm using Jenkins on my local linux machine.
  I've got a local git repository, that's also using bitbucket as its origin.</p>
  
  <p>I'm attempting to get Jenkins to build from the local git repository, but every time it builds, it gets the following error:</p>
  
  <pre><code>Started by user Hippyjim 
  Building in workspace /var/lib/jenkins/workspace/Staging
  Checkout:Staging / /var/lib/jenkins/workspace/Staging - hudson.remoting.LocalChannel@15c0729
  Using strategy: Default
  Checkout:Staging / /var/lib/jenkins/workspace/Staging - hudson.remoting.LocalChannel@15c0729
  Fetching changes from 1 remote Git repository
  Fetching upstream changes from /home/hippyjim/PhpstormProjects/myRepo/.git
  ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
  hudson.plugins.git.GitException: Error performing command: git fetch -t /home/hippyjim/PhpstormProjects/myRepo/.git +refs/heads/*:refs/remotes/origin/*
  Command "git fetch -t /home/hippyjim/PhpstormProjects/myRepo/.git +refs/heads/*:refs/remotes/origin/*" returned status code 255: error: cannot open    .git/FETCH_HEAD: Permission denied
  </code></pre>
  
  <p>If I run the clone command it gives in the error message, it works fine. I just need Jenkins to pick up the changes on this local machine to be able to deploy my code. I'm totally stuck here - anyone got any ideas?</p>