title: How do I add a remote Git repository to an Ubuntu Server?
body: <p>I have created a Git repository on my Desktop machine (Windows 7) with:</p>
  
  <pre><code>git init
  git add &lt;all my files&gt;
  git commit -m "added my files"
  </code></pre>
  
  <p>Now I have installed a new Ubuntu Server 10.10 on a machine on my LAN and installed OpenSSH. My home directory is <code>/home/jonas</code> and I created a directory <code>~/code/</code> to contain my projects. I can log in to the Ubuntu Server from Windows 7 with Putty.</p>
  
  <p>I installed Git on the server with <code>sudo apt-get install git</code></p>
  
  <h2>Adding a remote repository</h2>
  
  <p>Now I want to add my Git repository on my Desktop to the Server. I tried to follow the instructions from <em>Pragmatic Version Control Using Git</em>.</p>
  
  <p>From my Desktop I run these commands:</p>
  
  <pre><code>git remote add origin jonas@192.168.1.10/home/jonas/code/myproject.git
  git push origin master
  </code></pre>
  
  <p>But I got this error message:</p>
  
  <pre><code>fatal: 'jonas@192.168.1.180/home/jonas/code/myproject.git' does not appear to be
   a git repository
  fatal: The remote end hung up unexpectedly
  </code></pre>
  
  <p><strong>What is the problem? How do I create the remote repository?</strong></p>
  
  <hr>
  
  <p>As PerfectlyNormal suggested, I added a <code>:</code> in the address. Now it worked better, and I had to type my password to the server, but then I got a similar error message:</p>
  
  <pre><code>fatal: '/home/jonas/code/myproject.git' does not appear to be a git repository
  fatal: The remote end hung up unexpectedly
  </code></pre>
  
  <p><strong>Do I have to initialize a Git repository on the server before I can  <code>git push</code> to it?</strong></p>