Set up a network in Git for collaborative work


I want to set up a network using git for the repositories, but not in a local way, but in some way there is a server and the other colleagues connected from home make their respective changes. I have a PC that I can use as a server, but it will not be on 24 hours. As if it were on GitHub but in local mode. How can I do that?

asked by Santiago 24.12.2015 в 00:57

3 answers


You can see Gitblit , it's a server for repositories developed in java, so it can be used in windows, linux and mac (even in others) ) also has a WAR version, which can be displayed in a container of Java applications.

It's really easy to configure and use, and it has the basic features that everyone needs

  • Create users
  • Tags
  • Activities window
  • Pull-Request
  • A code-diff
  • Possibility of integrating ticket services like thebuggenie

You can see a demo here

Translation of the installation of the GO version

  • Download and unzip Gitblit GO 1.7.1 (Windows) or 1.7.1 (Linux / OSX). It is best to delete spaces in the name of the route.

  • If the server is configured through a simple text file. Open the data/ file in your text editor   favorite and be sure to check and adjust: • server.httpPort and    server.httpsPortserver.storePassword (do not type # characters)

  • git.packedGitLimit (fixed larger than the size of your largest repository)

  • Run authority.cmd or java -cp gitblit.jar com.gitblit.authority.Launcher - database folder data from a line   Command

    • Fill in the fields in the new certificate defaults dialog
    • Enter the warehouse password used in server.storePassword when prompted. This generates a   SSL certificate for localhost.
    • You might want to generate an SSL certificate for the hostname or ip address hostnames that you are serving as NOTE:   You can only have an SSL certificate specified for a port.
    • Exit the application of authority
  • Run gitblit.cmd or java -jar gitblit.jar - baseFolder data from a command line
  • Open your browser to http://localhost:8080 or https://localhost:8443 depending on the chosen configuration.
  • Enter the default administrator credentials: admin / admin and click on the button Start session

NOTE: Be sure to change the username and / or administrator password !!

Translation of the WAR version

  • Download Gitblit WAR 1.7.1 to the webapps folder of your servlet container. [1 see note below]
  • You may have to manually extract the WAR (zip file) to a folder within the webapps folder.
  • By default, the Gitblit web application is configured through WEB-INF/ data/ . Open    WEB-INF/data/ in your favorite text editor and   Be sure to check and adjust: git.packedGitLimit (fixed larger   than the size of your largest repository)      
  • You may have to restart the servlet container.
  • Open your browser in http://localhost/gitblit or the address of your application container.
  • Enter the default administrator credentials: admin / admin and click on the Sign in button

NOTE: Be sure to change the username and / or administrator password !!

Note 1: Glassfish or Apache Tomcat should work as a container, you can see its installation in the following tutorials:

answered by 15.01.2016 / 17:06

Git can work like this without other software. There are three protocol options you can use, according to Pro Git :

In your case, the Git protocol may be the most reasonable, because it is part of git, and so does not require other software.


The Git protocol is a special daemon, which is incorporated with Git. Listen for a dedicated port (9418), and give us a service similar to that of the SSH protocol; but without any authentication.

If you want authentication, you can consider using SSH.

The chapter Git on a server , from the Pro book Git , explains how to install git to use the git protocol, and SSH.

It is important to understand that this only serves as a server for Git; does not include the web interface like GitHub. Therefore, there are several options, such as GitLab , GitHub Enterprise , and others. There are also options with simpler web interfaces, such as GitWeb , which you can use in conjunction with your server. Git. But I can not make a specific recommendation for these, because the best option for you depends a lot on your case, your budget, and your preferences.

answered by 24.12.2015 в 10:07

Dear you can use Gitolite


  • Easy to set up
  • Easy to use
  • You do not need a server 24/7
  • A lot of documentation
  • Pure git


  • Only in Linux distro: Ubuntu (Tested)
  • Knowledge of permissions, users and groups in linux

For more information link .

answered by 24.12.2015 в 15:13