title: git fetch insufficient permission for adding an object to repository database .git/objects?
body: <p>In my repo in my home directory (on an Ubuntu box) I did</p>
  
  <pre><code> git fetch
  </code></pre>
  
  <p>I unfortunately got an error about: </p>
  
  <pre><code> insufficient permission for adding an object to repository database .git/objects
  </code></pre>
  
  <p>There's a gazillion directories in .git/objects and all of them appear to be 775.  The few spot checks I did show the files to be 664.  </p>
  
  <p>I went and did a </p>
  
  <pre><code> chmod -R 777 .git/objects 
  </code></pre>
  
  <p>which fixed the problem but now I've got a bunch of files 777 on my box and I'm sure that's a no-no.</p>
  
  <p>What should the correct permissions be and how can I easily get all 10 million files and directories set correctly?</p>
  
  <p>Thanks in advance.</p>