{"thread":{"id":"61264","subject":"Git Server","startedAt":"2024-04-04T09:54:57Z","lastAt":"2024-04-05T09:11:56Z","messageCount":5,"participants":["Simon Phai","Konstantin Khomoutov","brian m. carlson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"492229","messageId":"CACArJ22jCTArv=U-XW61P8x6sa0rrXYupQvh_txdSk6vAG7p6Q@mail.gmail.com","threadId":"61264","inReplyTo":null,"subject":"Git Server","fromName":"Simon Phai","fromEmail":"simonphaikm@gmail.com","sentAt":"2024-04-04T09:54:44Z","receivedAt":"2024-04-04T09:54:57Z","isPatch":false,"sender":{"key":"simonphaikm@gmail.com","avatar":null},"body":"Hi Guys,\n\nI want to host my own git server, may I understand the server OS can\nit be windows?\n\nBest Regards,\nSimon\n"},{"id":"492230","messageId":"20240404100854.5vfozqo7iiyyshoc@carbon","threadId":"61264","inReplyTo":"CACArJ22jCTArv=U-XW61P8x6sa0rrXYupQvh_txdSk6vAG7p6Q@mail.gmail.com","subject":"Re: Git Server","fromName":"Konstantin Khomoutov","fromEmail":"kostix@bswap.ru","sentAt":"2024-04-04T10:08:54Z","receivedAt":"2024-04-04T10:09:11Z","isPatch":false,"sender":{"key":"kostix@bswap.ru","avatar":null},"body":"On Thu, Apr 04, 2024 at 05:54:44PM +0800, Simon Phai wrote:\n\n> I want to host my own git server, may I understand the server OS can\n> it be windows?\n\nYes.\n\nBut note that there exist quite many ways to \"host a Git server\", so you\nshould maybe explore what's already there and specify your requirements more\nprecisely.\n\nIn the simplest form (if we forget about just running git-daemon in a console\nwindow - providing unprotected R/O access to a given repository), you either\nset up Git to be accessible via an SSH server or via a web server (IIS works).\n\n"},{"id":"492232","messageId":"CACArJ23dNONx-Fk5VwZZ+A64aEYW0nhn+X6q50W5hKLN=VbEng@mail.gmail.com","threadId":"61264","inReplyTo":"20240404100854.5vfozqo7iiyyshoc@carbon","subject":"Re: Git Server","fromName":"Simon Phai","fromEmail":"simonphaikm@gmail.com","sentAt":"2024-04-04T10:26:31Z","receivedAt":"2024-04-04T10:26:44Z","isPatch":false,"sender":{"key":"simonphaikm@gmail.com","avatar":null},"body":"actually I'm quite new to this but I would like to setup my own git\nserver so that my fellows can develop our own repository, I find\nonline there isn't much guide on using windows server to do it.\n\nOn Thu, Apr 4, 2024 at 6:08 PM Konstantin Khomoutov <kostix@bswap.ru> wrote:\n>\n> On Thu, Apr 04, 2024 at 05:54:44PM +0800, Simon Phai wrote:\n>\n> > I want to host my own git server, may I understand the server OS can\n> > it be windows?\n>\n> Yes.\n>\n> But note that there exist quite many ways to \"host a Git server\", so you\n> should maybe explore what's already there and specify your requirements more\n> precisely.\n>\n> In the simplest form (if we forget about just running git-daemon in a console\n> window - providing unprotected R/O access to a given repository), you either\n> set up Git to be accessible via an SSH server or via a web server (IIS works).\n>\n"},{"id":"492270","messageId":"Zg8YUYSH2cSb7k6J@tapette.crustytoothpaste.net","threadId":"61264","inReplyTo":"CACArJ23dNONx-Fk5VwZZ+A64aEYW0nhn+X6q50W5hKLN=VbEng@mail.gmail.com","subject":"Re: Git Server","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2024-04-04T21:14:57Z","receivedAt":"2024-04-04T21:15:00Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2024-04-04 at 10:26:31, Simon Phai wrote:\n> actually I'm quite new to this but I would like to setup my own git\n> server so that my fellows can develop our own repository, I find\n> online there isn't much guide on using windows server to do it.\n\nIt's probably true that there's little documentation on hosting a Git\nserver on Windows because most people doing so on their own do it on\nLinux or another Unix system.  It certainly is possible, but because\nit's a rather uncommon configuration, you'll typically be left to\nfiguring it out for yourself.\n\nIf you're using a Unix system, there are options like Gitolite and\nForgejo, depending on what you're looking for, but I'm unsure if any of\nthose support Windows.  Running such a tool may be easier than doing it\nyourself, but you may find that the documentation in `git http-backend\n--help` may help you set up Git with an HTTP server (such as Apache) if\nyou're interested in doing that.\n\n[Also, it's polite on this list to reply inline instead of on top with\neverything quoted underneath.]\n-- \nbrian m. carlson (they/them or he/him)\nToronto, Ontario, CA\n"},{"id":"492283","messageId":"20240405091138.youg4wfk3r3lw2k2@carbon","threadId":"61264","inReplyTo":"CACArJ23dNONx-Fk5VwZZ+A64aEYW0nhn+X6q50W5hKLN=VbEng@mail.gmail.com","subject":"Re: Git Server","fromName":"Konstantin Khomoutov","fromEmail":"kostix@bswap.ru","sentAt":"2024-04-05T09:11:38Z","receivedAt":"2024-04-05T09:11:56Z","isPatch":false,"sender":{"key":"kostix@bswap.ru","avatar":null},"body":"(Reformatted to have inline style [1].)\n\nOn Thu, Apr 04, 2024 at 06:26:31PM +0800, Simon Phai wrote:\n\n> > > I want to host my own git server, may I understand the server OS can\n> > > it be windows?\n> >\n> > Yes.\n> >\n> > But note that there exist quite many ways to \"host a Git server\", so you\n> > should maybe explore what's already there and specify your requirements\n> > more precisely.\n> >\n> > In the simplest form (if we forget about just running git-daemon in a\n> > console window - providing unprotected R/O access to a given repository),\n> > you either set up Git to be accessible via an SSH server or via a web\n> > server (IIS works).\n> >\n> actually I'm quite new to this but I would like to setup my own git\n> server so that my fellows can develop our own repository, I find\n> online there isn't much guide on using windows server to do it.\n\nUnfortunately, this added not too much information to the original question.\nI mean, now we know that you want to host a Git server on a Windows system,\nthere is a single repository to make access to and that there is going to be\nmore than a single person to have access to that repository.\n\nOK, let us try to maybe move a bit further.\n\nThe first thing to know, is that Git does not provide any \"high-level\" -\nGithub-like or GitLab-like, is you want - solution out of the box.\nIt basically provides three ways to access Git repositories remotely:\n\n - A thing called \"git-daemon\" which provides an unprotected and\n   unauthenticated access to a Git repository. Because of these properties,\n   by default the access it read-only, and even though you can convince it\n   to be read-write, it's a bad idea unless you really understand what you're\n   doing, and, based on what you described about your prospective setup,\n   this is certainly not what you want to do.\n\n - Two low-level programs (whose names do not matter) which are supposed to be\n   used in conjunction with an SSH client and server. This means you need to\n   have an SSH server running on the host with a Git repository (or multiple\n   repositories), and the clients are to use SSH clients to access those\n   repositories. For clients, this happens almost transparently - they do not\n   need to manually run SSH clients, it's done by \"git push/fetch/pull\"\n   commands automatically when the URL of a remote repo has the \"ssh://\"\n   scheme, - but the server-side setup has to be rather explicit.\n\n - More low-level commands intended to serve access to Git repos with the help\n   of an HTTP server. This works in a manner quite similar to that of SSH,\n   just HTTP (these days, HTTPS is more common) transport is used instead.\n   Again, clients handle this automatically if the URL of a remote repository\n   to work with has the \"http://\" or \"https://\" schemes.\n\nNote that neither of the described solutions provide any user management and\naccess control facilities, and this is arguably the most complex part of\nsetting server-side Git up: making an SSH or HTTP server start Git is not too\ncomplex, but putting up user management and access control is harder, and is\ndifferent for SSH and HTTP.\n\nTo research, you could start with [2] and [3]. These do not present the whole\nsolutions but at least it's something you can probably start with.\n\nAlso note that having an SSH+Git and/or HTTP+Git combo only allows you to\nmaintain a so-called \"rendez-vouz\" repository (or a set of them) basically\nused by a team to share their developments. Such a solution won't provide you\nwith a web-browsable access to repositories, code review, issue tracker and so\non and so forth. There will also be quite limited, if any, access to\nfine-grained access control - basically to who can push where. If you need\nanything of the above, you might have better luck trying a \"turn-key\" solution\nsuch as [4] or [5].\n\n 1. https://en.wikipedia.org/wiki/Posting_style#Interleaved_style\n 2. https://github.com/PowerShell/Win32-OpenSSH/wiki/Setting-up-a-Git-server-on-Windows-using-Git-for-Windows-and-Win32_OpenSSH\n 3. https://smalltech.com.au/blog/how-to-run-a-git-server-on-windows-with-iis\n 4. https://about.gitea.com/products/gitea/\n 5. https://gogs.io\n\n"}]}