Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Now we want to set up a private git repository in the ubuntu 12.10,then other developments can access it through the local network.

Now I just can create a repository use git init,for example:

cd myproject
git init

Which will create .git directory,but I do not know how to access it thougth network like:


Any idea?

BTW,I have tried:

git init --bare

which will give me a error:

git add error : "fatal : malloc, out of memory"
share|improve this question

migrated from Sep 11 '12 at 9:06

This question came from our site for professional and enthusiast programmers.

up vote 2 down vote accepted

installing GIT just gives your linux machine the software to handle a GIT reporitory on the machine. The difference between a local GIT repository and a master network repository, is the master network repository can be accessed over the network.

So, you need to setup an account on the server for the clients to SSH into, and setup details to match on all the clients. This page has some info that looks about right. (disclaimer - I haven't followed these actual steps in this particular howto myself but they are what I expect them to be off the top of my head)

PS: for the failing repository init command, try this:

git --bare init

instead of

git init --bare
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.