Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Ok, I figured it out. The issue was that I didn't have the correct permissions set for myrepo.git and the parent directory git. </p> <p>As root I logged into the server and used:</p> <pre><code>$ chown username /home/username/git </code></pre> <p>This then returns drwxrwxr-x 4 username root 4096 2012-10-30 15:51 /home/username/git with the following:</p> <pre><code>$ ls -ld /home/username/git </code></pre> <p>I then make a new directory for myrepo.git inside git:</p> <pre><code>$ mkdir myrepo.git $ ls -ld myrepo.git/ drwxr-xr-x 2 root root 4096 2012-10-30 18:41 myrepo.git/ </code></pre> <p>but it has the user set to root, so I change it to username the same way as before.</p> <pre><code>$ chown username myrepo.git/ $ ls -ld myrepo.git/ drwxr-xr-x 2 username root 4096 2012-10-30 18:41 myrepo.git/ </code></pre> <p>I then sign out of root and sign into server as username:</p> <p>Inside git directory:</p> <pre><code>$ cd myrepo.git/ $ git --bare init Initialized empty Git repository in /home/username/git/myrepo.git/ </code></pre> <p>On local machine:</p> <pre><code>$ git remote add origin ssh://username@server.com/home/username/git/myrepo.git $ git push origin master </code></pre> <p>SUCCESS!</p> <p>Hopefully this comes in handy for anyone else that runs into the same issue in the future!</p> <p>Resources</p> <ul> <li><a href="http://www.cyberciti.biz/tips/unix-or-linux-commands-for-changing-user-rights.html" rel="noreferrer">http://www.cyberciti.biz/tips/unix-or-linux-commands-for-changing-user-rights.html</a></li> <li><a href="http://www.cyberciti.biz/faq/how-to-use-chmod-and-chown-command/" rel="noreferrer">http://www.cyberciti.biz/faq/how-to-use-chmod-and-chown-command/</a></li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload