title: Jenkins fails to fetch the repo some times
body: <p>Hi I am getting this error when I try to build my project in Jenkins.</p>
  
  <pre><code>Started by user jenkins
  Building in workspace /var/lib/jenkins/workspace/booking-widget-api
   &gt; git rev-parse --is-inside-work-tree # timeout=10
  Fetching changes from the remote Git repository
   &gt; git config remote.origin.url https://xxx@bitbucket.org/yyy/repo-name.git # timeout=10
  Fetching upstream changes from https://xxx@bitbucket.org/yyy/repo-name.git
   &gt; git --version # timeout=10
  using GIT_ASKPASS to set credentials 
   &gt; git fetch --tags --progress https://xxx@bitbucket.org/yyy/repo-name.git +refs/heads/*:refs/remotes/origin/*
  ERROR: Error fetching remote repo 'origin'
  hudson.plugins.git.GitException: Failed to fetch from https://xxx@bitbucket.org/yyy/repo-name.git
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:888)
      at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1155)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)
      at hudson.scm.SCM.checkout(SCM.java:504)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
      at hudson.model.Run.execute(Run.java:1794)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)
  Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://xxx@bitbucket.org/yyy/repo-name.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
  stdout: 
  stderr: remote: Counting objects: 8, done.        
  remote: Compressing objects:  12% (1/8)           
  remote: Compressing objects:  25% (2/8)           
  remote: Compressing objects:  37% (3/8)           
  remote: Compressing objects:  50% (4/8)           
  remote: Compressing objects:  62% (5/8)           
  remote: Compressing objects:  75% (6/8)           
  remote: Compressing objects:  87% (7/8)           
  remote: Compressing objects: 100% (8/8)           
  remote: Compressing objects: 100% (8/8), done.        
  remote: Total 8 (delta 5), reused 0 (delta 0)        
  error: insufficient permission for adding an object to repository database .git/objects
  fatal: failed to write object
  fatal: unpack-objects failed
  
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2002)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1721)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:405)
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:886)
      ... 11 more
  ERROR: Error fetching remote repo 'origin'
  Finished: FAILURE
  </code></pre>
  
  <p>First time when I get this error. I just give up for some time (a day). Then I build the project, it worked as normal and build successfully. Now again I am getting this error. Does any body face this kind of issue?</p>