32

How can I setup GIT server On-Premise on windows machine, so it is accessible privately, only from local network. Note that, I want to run GIT as server, not as Network Share.

Article in GIT documentation shows how to setup server only on Linux machines.

I have tried GitStack but I wasn't able to put it to work (possibly due to wrong configurations).

AaA
  • 3,600
  • 8
  • 61
  • 86
Batto
  • 333
  • 1
  • 3
  • 7

5 Answers5

29

I use Bonobo git server on windows to serve my repositories via https using IIS as the web server. It works quite well but has some quirks when you want to have active directory (windows) authentication (you essentially need 2 Bonobo instances which I somehow didn't manage to get working). I access my Bonobo git repositories from Visual Studio, TortoiseGit and the git console, it just works as expected.

Dirk Trilsbeek
  • 5,873
  • 2
  • 25
  • 23
  • This is pretty much what we wanted. Access a private Repo from Visual studio and possibly TortoiseGit. Thanks for confirm that it works with visual studio and once I have time I will work on this and setting it up. Thank you – Batto May 19 '15 at 09:03
  • So I just installed bonobo on the computer thats going to be the server for our projects. The problem is that I cannot connect to it using other computer. How should I make this connection? For exemple, using visual studio what kind of configs do I need to have so it uploads directly to the Bonobo Server computer? – Batto May 22 '15 at 15:12
  • I always started with a local git repository (using TGit or git bash). Then I cloned that local repository into a bare repository that I uploaded to the repository directory of my bonobo server. After logging on to the bonobo server the new repository is discovered and you can assign users and groups to it. You can then configure your local repository to use that remote repository. I chose the easier way and cloned the remote repository again into a new local repository, that way the remote repository is already configured. But you probably can also just add it to the git configuration. – Dirk Trilsbeek May 22 '15 at 18:06
18

So me and a friend of mine wanted to start programing

I'd recommend you to spend your effort and motivation on programming. Don't bother creating your own private remote repository, because you don't need one yet:

  1. Your local folder under git version control is already a git repository.
  2. If you want to collaborate:
    • GitHub is most popular for opensource projects, and it supports private repositories (up to 3 users).
    • GitLab allows private repositories for teams of unlimited size.
    • Bitbucket also allows private repositories, available for teams of up to 5 users.

There's a great collection of git references here: Git for beginners: The definitive practical guide

Mehdi Khademloo
  • 2,754
  • 2
  • 20
  • 40
Nick Volynkin
  • 14,023
  • 6
  • 43
  • 67
  • Just out of interest, GitLab has a "Community" version which is free, but I cannot see any wording which explicitly says that enterprises/large companies cannot use it. Am I correct in this thinking? (It's not like Visual Studio's community edition) – Worthy7 Jul 10 '17 at 04:05
  • @Worthy7 yep, I worked in a company with around 3000 employees which used a self-hosted GitLab CE. It was just enough, at least from a humble test engineer's perspective. :) – Nick Volynkin Jul 10 '17 at 04:15
  • @Worthy7 although, I'm not sure about the cloud version (the gitlab.com). – Nick Volynkin Jul 10 '17 at 04:16
  • That's fine, I just meant in terms of licencing. – Worthy7 Jul 10 '17 at 04:17
  • I believe "should" or "should not" is not the correct answer in SO. other users come here to find solution for a problem and since a question already exist, asking a duplicate is not nice. – AaA Sep 27 '20 at 08:38
  • I work for a big publicly traded company that I guarantee you'd recognize. I had a meeting with several GitLab folks within the last month and they told me that we're clear to use the free edition for our use case with a private project, which I described as having potentially hundreds of users. – Walt Oct 29 '21 at 16:38
8

Windows

Some time ago I used Bonobo git server. Simple to install, configuration over web-interface.

Linux

I don't like windows for git server. So I installed Linux and gitolite3+gitweb. Simple to install, simple to use, more access control over repository, web access over gitweb.

Now I use gitlab. Very simple to install and all configuration over web-interface.

gomons
  • 1,946
  • 14
  • 25
6

On Windows, you could use gitbucket, gogs (a very good and painless git server) [edit: there is now a community fork of gogs that seems more alive https://gitea.io ] or also gitblit that are in java or scala and that are just a command away if you launch them from the war with the embedded http server.

But like said by @gomons, perhaps you should consider to use a Linux server (at least one VM --sometime downloadable in the project Web site-- in virtual box), that way your choice will be quite more large with a lot of good git server: gitlab,... Even gerrit if you want a code review tool

On the web site of gitea, you have a good feature comparison : https://docs.gitea.io/en-us/comparison/

Philippe
  • 28,207
  • 6
  • 54
  • 78
2

I use GitStack, a software equipped with an administration interface to manage your deposits. Moreover, it is simple to use and to install Personally, I recommend for both beginners and experts

S. FRAJ
  • 91
  • 1
  • 2