Live data from Hacker News

How to Host Your Own Private Git Repositories

eklitzke.org

91–100 of 114 posts

Re: How to Host Your Own Private Git Repositories

#91
post #83

"Doing this is cheaper than paying GitHub, and it will give you the satisfaction of being a True Hacker." Or I could work on problems that really matter and leave the sysadmin job to someone who gets paid to do it. ;) More seriously, when I was in college, I spent a lot of time doing things like running my own mailserver, selfhosting various projects, etc. I learned a lot. But in the Real World, I don't want to be re…

Except running a git server is little more than having a place to store a git repo and giving ssh access to it. There's really no maintenance if you already have the server. What github et al provide isn't repo hosting so much as fancy UI tools on top of that. Edit: seriously, I wonder how many people who just automatically go to github have ever bothered to try the simple act of creating a git remote on a file serve…

The problem (for me) is that I have no clue how to effectively manage UNIX users. I don't want my git user to have access to the full filesystem, and maybe I want to add another user for a friend who can only see game.git but not taxes.git, etc.

Using SSH on a local server works for some use cases (and I do use it) but it doesn't scale at all.

Re: How to Host Your Own Private Git Repositories

#92
post #83

"Doing this is cheaper than paying GitHub, and it will give you the satisfaction of being a True Hacker." Or I could work on problems that really matter and leave the sysadmin job to someone who gets paid to do it. ;) More seriously, when I was in college, I spent a lot of time doing things like running my own mailserver, selfhosting various projects, etc. I learned a lot. But in the Real World, I don't want to be re…

Except running a git server is little more than having a place to store a git repo and giving ssh access to it. There's really no maintenance if you already have the server. What github et al provide isn't repo hosting so much as fancy UI tools on top of that. Edit: seriously, I wonder how many people who just automatically go to github have ever bothered to try the simple act of creating a git remote on a file serve…

But the fancy UI tools are the thing the people want. In real world after setting up your ssh on your fileserver, you are ending up in installing gitlab, etc which includes maintaining a database, webserver, ssl certs, etc

Re: How to Host Your Own Private Git Repositories

#93
post #83

"Doing this is cheaper than paying GitHub, and it will give you the satisfaction of being a True Hacker." Or I could work on problems that really matter and leave the sysadmin job to someone who gets paid to do it. ;) More seriously, when I was in college, I spent a lot of time doing things like running my own mailserver, selfhosting various projects, etc. I learned a lot. But in the Real World, I don't want to be re…

In the "real world" people like to keep their private source code private, and they run version control servers on their own LAN with tape backups or the like.

I personally set up a remote-access git repository on Windows, with Windows domain authentication (Apache+mod_ldap+mod_authnz_ldap), and it wasn't any more difficult than any other Apache installation; a more sensible platform would require a negligible effort.

Re: How to Host Your Own Private Git Repositories

#94

For those who aren't aware, Git is actually a fully decentralised system. It doesn't require a central server as such - though most teams use one, as it's a convenient setup for most projects. Even if you are hosting on github/bitbucket/et. al. though, that repository is just one of many equals. You can push and pull from multiple peers as long as you have access set up appropriately. I recommend the chapter on distr…

> Even if you are hosting on github/bitbucket/et. al.

Normally if you're hosting on one of those sites, you're using other features (wiki/issues), which may _not_ be decentralised

Re: How to Host Your Own Private Git Repositories

#95

Earlier quoted context omitted.

Could you point to the documentation regarding per-directory access control? I find the documentation very difficult to navigate and I can't find anything relevant. I'm also not sure how it could work.

> I'm also not sure how it could work Git repos can have an "update hook" that is executed during a push, after the new commits have been uploaded, but before the branch is updated to include the new commits. The hook can inspect the new commits, compare them to the old ones, and decide to reject the update. (It's a shell script, so every imaginable condition is possible.)

But that cannot prevent read access on a per-directory basis. I appreciate now that's not what you were referring to.

I did find http://gitolite.com/gitolite/list-non-core/#partial-copy-sel... which seems to almost do what I wanted but that'll quickly explode to many copies of copies for any non-trivial situation. I know git can't do what I'm asking but every now and then something comes along and I gives me some hope before reality sets in.

Re: How to Host Your Own Private Git Repositories

#96

Earlier quoted context omitted.

> I'm also not sure how it could work Git repos can have an "update hook" that is executed during a push, after the new commits have been uploaded, but before the branch is updated to include the new commits. The hook can inspect the new commits, compare them to the old ones, and decide to reject the update. (It's a shell script, so every imaginable condition is possible.)

But that cannot prevent read access on a per-directory basis. I appreciate now that's not what you were referring to. I did find http://gitolite.com/gitolite/list-non-core/#partial-copy-sel... which seems to almost do what I wanted but that'll quickly explode to many copies of copies for any non-trivial situation. I know git can't do what I'm asking but every now and then something comes along and I gives me some hop…

I do have a colleague using a partial copy, but if you need fine-grained read access control, you either need lots of git repos, or a different version control system.

Re: How to Host Your Own Private Git Repositories

#97

Why self-host your repo but store backups without encryption at google or amazon? If you want it to be private, just make it so. edit: thanks anyway for your version!

Privacy isn't binary, and there's a large difference between "Amazon could potentially read this, but they'd be breaking their own ToS and some laws to do so" and "Public on the internet".

But what is the difference with BitBucket then?

Besides, if you worry that state actors are interested in your source code, I do not see how Amazon being law-abiding would be of any help here..

Re: How to Host Your Own Private Git Repositories

#98
post #83

"Doing this is cheaper than paying GitHub, and it will give you the satisfaction of being a True Hacker." Or I could work on problems that really matter and leave the sysadmin job to someone who gets paid to do it. ;) More seriously, when I was in college, I spent a lot of time doing things like running my own mailserver, selfhosting various projects, etc. I learned a lot. But in the Real World, I don't want to be re…

Except running a git server is little more than having a place to store a git repo and giving ssh access to it. There's really no maintenance if you already have the server. What github et al provide isn't repo hosting so much as fancy UI tools on top of that. Edit: seriously, I wonder how many people who just automatically go to github have ever bothered to try the simple act of creating a git remote on a file serve…

On the contrary, there's a ton of maintenance, and the hosting providers like GitHub and Microsoft pay teams of people to deal with the infrastructure. (I've worked on both.) This involves not just the physical infrastructure like the servers, though of course there's that, but also maintaining the bits on disk. Your repository will get duplicated across multiple disks on multiple machines, perhaps in different availability zones, and then of course they're backed up to yet another location.

So what companies like GitHub and Microsoft provide is - yes - the fancy tools on top but also teams of professionals ensuring that your repositories are available quickly.

Re: How to Host Your Own Private Git Repositories

#99
post #59
post #21

Earlier quoted context omitted.

I moved to https://gitea.io/ myself, largely because it seems to be more frequently updated these days.

definitely the best git repo for small teams! better than gitolite and manual hosting, lighter than gitlab, the best for me.

Do you do code review in your teams? That's the main reason that I am using Gitlab over Gogs/Gitea for my team.

Re: How to Host Your Own Private Git Repositories

#100

Earlier quoted context omitted.

Except running a git server is little more than having a place to store a git repo and giving ssh access to it. There's really no maintenance if you already have the server. What github et al provide isn't repo hosting so much as fancy UI tools on top of that. Edit: seriously, I wonder how many people who just automatically go to github have ever bothered to try the simple act of creating a git remote on a file serve…

On the contrary, there's a ton of maintenance, and the hosting providers like GitHub and Microsoft pay teams of people to deal with the infrastructure. (I've worked on both.) This involves not just the physical infrastructure like the servers, though of course there's that, but also maintaining the bits on disk. Your repository will get duplicated across multiple disks on multiple machines, perhaps in different avail…

GitHub etc. need "a ton of maintenance" because of the "fancy tools", which are an unusually complex and sophisticated constantly evolving web application with many users.

A private source repository is far less demanding: it's almost never upgraded, and for system administrators it's just another server to keep running and another file system to back up.

Post reply on HN