Live data from Hacker News

How to Host Your Own Private Git Repositories

eklitzke.org

81–90 of 114 posts

Re: How to Host Your Own Private Git Repositories

#81
post #60

Gitlab also can be run in your own server. It actually has an enterprise and an open source version. We use the open source one for a couple of years and it is really great - I recommend it with all my heart. It has great instructions for installing directly from source and you don't really need to be familiar with ruby to install it. It requires some standard components (web server, database) which should exist on a…

Gitlab is massive though. I think it's a great solution for teams on dedicated hardware, but if you need something quick, low-maintenance and lightweight Gitlab might be a bit overkill.

Digital Ocean has so called one click apps, that they can deploy and setup at any droplet and gitlab is one of them: https://www.digitalocean.com/products/one-click-apps/gitlab/

I have tried it before and it just works, took my less than 5 minutes to have a fully working gitlab instance on a $10/month droplet. It's not the cheapest option probably, but very low effort so it's quite worth it.

Re: How to Host Your Own Private Git Repositories

#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 responsible for more than I have to be; off the shelf products are just better for me, most of the time.

The fact that Bitbucket and Github will pay a guy to run a git server for me is amazing (even if it is evidence of some sort of irrational enthusiasm on part of VC firms). Why would I not want to take advantage?

Re: How to Host Your Own Private Git Repositories

#84

Earlier quoted context omitted.

> Why do this when http://bitbucket.com will host private git repos for free? Because you never know when one of these online services will suffer an outage, suffer a security breach that leasks your private repos or email & credentials, or even lose your data entirely. The fact that the service is free doesn't mean that it doesn't come without potential issues.

But... you are using another online service to host the service yourself, no? And presumably they are also throwing in backups and redundancy of some sort... certainly it would take you a minute to set those things up, test them, monitor they are working... And isn't GitHub basically like everyone's resume these days? I don't know... at some point you sort of just have to trust someone... be it the hosting provider,…

>And isn't GitHub basically like everyone's resume these days?

GitHub is not, and never will be, a good CV.

Re: How to Host Your Own Private Git Repositories

#85

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".

Amazon breaks dozens of laws all over the world every day just by existing (illegal anti-competitive activities, probable tax evasion, definite illegal tax avoidance, etc.). So I don't think that breaking a few more laws bothers them.

Re: How to Host Your Own Private Git Repositories

#86
post #42

Security question. Can `git-shell` restrict users to their remote home directory? Or if you give me a git shell, can I still do things like `git clone me@example.com:/home/you/secret-sauce` ? This is only an issue if you're sharing the box and/or remote repositories with other people. For shared remote repositories I've been using the following setup: 1. Create a bare, shared repository at `/var/git/foo`. Configure u…

For multi-user use probably best solutions are scripts/systems that automate this whole thing like gitosis and gitolite. You get multiple users logging in as same system user which are authenticated by their SSH key and administration of the thing is mostly performed by commiting into special git repository.

Re: How to Host Your Own Private Git Repositories

#87
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 server on their own network, or even just to a different host. It's really easy, and it really underscores how simple it is to have your repo distributed without any 3rd party infrastructure. Once you see that, you see that putting a copy on a shell account on your hosted VM is dirt simple and requires almost no administrative burden.

Re: How to Host Your Own Private Git Repositories

#88
post #77

Earlier quoted context omitted.

Then use a chroot.

You could do that, but that means for a shared repo and N git shell accounts you've got N chroots, presumably using null or bind mounts. That's a lot more work than a restricted shell which just...restricts.

True, it all depends what your requirements are.

Personally I'd just designate a path for shared repos (e.g. /srv/vcs/{.git,.hg} etc), give people write access using ACLs and group membership. If they create repos in their home directories, thats their business.

Re: How to Host Your Own Private Git Repositories

#89
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…

I did, because I wanted to have the experience of understanding how a Git server works. But I still like using GitHub. Their web UI is useful, and I don't have to maintain a server.

Re: How to Host Your Own Private Git Repositories

#90
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…

Github, bitbucket, gitlab, et. al are more than a git server. They are code review, community management, issue tracking, and the literally hundreds of integrations for all parts of the software development lifecycle.

Anyone with more than a personal pet-project will understand the value created by these services the moment they have to stand up the supporting items that make SDLC possible.

Post reply on HN