title: Git error: "fatal: .. does not appear to be a git repository" - when deploying via Capistrano
body: <p><strong>Background:</strong> I'm aiming to deploy a rails app and am hosting a remote repository for this app on DreamHost. I am using Git for version control. I have created a local repository, committed and pushed this to the remote repository via ssh. <a href="http://craigjolicoeur.com/blog/hosting-git-repositories-on-dreamhost" rel="nofollow noreferrer">This</a> is roughly the process I took in creating the remote repository. I seem to have created the remote repository successfully. This is what was returned after executing the push to the remote repository:</p>
  
  <pre><code>Brent$ git push --all
  $USER@$SERVER.dreamhost.com's password: 
  Counting objects: 7, done.
  Delta compression using up to 2 threads.
  Compressing objects: 100% (4/4), done.
  Writing objects: 100% (4/4), 405 bytes, done.
  Total 4 (delta 3), reused 0 (delta 0)
  To ssh://$USER@$SERVER.dreamhost.com/home/$USER/git/movie-shelf.git
     0e93104..5782611  master -&gt; master
  </code></pre>
  
  <p><strong>Problem:</strong> I'm trying (rather unsuccessfully at the moment) to use Capistrano to handle my deployment process. Executing a cap deploy:check returns:</p>
  
  <pre><code>You appear to have all necessary dependencies installed
  </code></pre>
  
  <p>Yet, when I run cap deploy:cold, I get the following:</p>
  
  <pre><code>Brent$ cap deploy:cold
    * executing `deploy:cold'
    * executing `deploy:update'
   ** transaction: start
    * executing `deploy:update_code'
      updating the cached checkout on all servers
      executing locally: "git ls-remote /home/$USER/git/movie-shelf.git master"
  fatal: '/home/$USER/git/movie-shelf.git' does not appear to be a git repository
  fatal: The remote end hung up unexpectedly
  *** [deploy:update_code] rolling back
    * executing "rm -rf /home/$USER/$APPLICATION/releases/20100919094735; true"
      servers: ["$SERVER.dreamhost.com"]
  Password: 
      [$SERVER.dreamhost.com] executing command
      command finished
  Command git ls-remote /home/$USER/git/movie-shelf.git master returned status code pid 71920 exit 128
  </code></pre>
  
  <p>The repository path I have set in my deploy.rb is this:</p>
  
  <pre><code>set :repository, "/home/#{user}/git/movie-shelf.git"
  </code></pre>
  
  <p>Whew. So, after all that, I'm basically wondering what I'm missing that could be causing that error. :)</p>