title: Setting up a local git repository on Ubuntu
body: <p>I'm trying to setup a Git repo on my local machine for work that is being done on my local machine - no remote anything.</p>
  
  <p>I've setup remote repos several times but it seems the steps I take locally always end up with errors.</p>
  
  <p>I have 2 directories:  <code>/home/rico/project</code> and <code>/home/git/project_repo</code></p>
  
  <p>I've created the git user to manage all my git repos (I expect to have dozens).</p>
  
  <p>From <code>/home/rico/project</code> as the <code>rico</code> user I do the following command:</p>
  
  <pre><code>rico@verbal:~/project$ git init
  Initialized empty Git repository in /home/rico/project/.git/
  </code></pre>
  
  <p>From <code>/home/git/project_repo</code> as the <code>git</code> user I do the following:</p>
  
  <pre><code>git@verbal:~/project_repo$ git --bare init
  Initialized empty Git repository in /home/git/project_repo
  </code></pre>
  
  <p>Now I go back to my project and add files.</p>
  
  <pre><code>rico@verbal:~/project$ git status
  # On branch master
  #
  # Initial commit
  #
  # Untracked files:
  #   (use "git add &lt;file&gt;..." to include in what will be committed)
  #
  #       .project
  #       .pydevproject
  #       inc/
  #       manage.py
  #       rocksolidbox/
  #       rsb/
  #       templates/
  rico@verbal:~/project$ git add inc media rocksolidbox/ rsb/ templates/
  rico@verbal:~/project$ git commit -a -m "Initialize the project."
  </code></pre>
  
  <p>At this point I get the normal commit message - <code>23 files changed, 989 insertions(+)</code> etc.</p>
  
  <p>Now, I want to push this to the <code>project_repo</code> folder.</p>
  
  <pre><code>rico@verbal:~/project$ git remote add origin /home/git/rocksolidbox/
  rico@verbal:~/project$ git push -u /home/git/rocksolidbox/ master
  </code></pre>
  
  <p>But receive the following error:</p>
  
  <pre><code>Counting objects: 31, done.
  Delta compression using up to 4 threads.
  Compressing objects: 100% (26/26), done.
  error: insufficient permission for adding an object to repository database ./objects
  
  fatal: failed to write object
  Writing objects: 100% (31/31), 12.24 KiB, done.
  Total 31 (delta 2), reused 0 (delta 0)
  error: unpack failed: unpack-objects abnormal exit
  To /home/git/project_repo/
   ! [remote rejected] master -&gt; master (n/a (unpacker error))
  error: failed to push some refs to '/home/git/project_repo/'
  </code></pre>
  
  <p>Clearly this is a permissions error.  I've tried to do the push such as:</p>
  
  <pre><code>rico@verbal:~/project$ git push -u git@verbal:/home/git/rocksolidbox/ master
  </code></pre>
  
  <p>Or even using my local IP:</p>
  
  <pre><code>rico@verbal:~/project$ git push -u git@192.168.1.101:/home/git/rocksolidbox/ master
  </code></pre>
  
  <p>It asks for a password, which I know I'm supplying correctly and I continually get the message <code>Permission denied, please try again.</code></p>
  
  <p>I just want to be able to push my <code>project</code> to my <code>project_repo</code>.  What am I doing wrong in this setup?</p>