Live data from Hacker News

How to set up your own private Git server on Linux

tumblr.intranation.com

1–10 of 66 posts

Re: How to set up your own private Git server on Linux

#2
I decided to move all my private repositories to my own server.

When you do this, make sure that the server has continuous backups. Also, make sure you still have an offsite backup.

Once you figure out what these things are worth, you may realize that you should probably just keep paying Github.

Re: How to set up your own private Git server on Linux

#4
I highly recommend using Gitosis; it makes managing teams, projects and users a breeze. It's really nifty: you get a git repo that contains the ssh keys and config file to manage the system. Add the user's key, add the user to the config file, push, and you're done!

Re: How to set up your own private Git server on Linux

#5
post #4

I highly recommend using Gitosis; it makes managing teams, projects and users a breeze. It's really nifty: you get a git repo that contains the ssh keys and config file to manage the system. Add the user's key, add the user to the config file, push, and you're done!

I don't see any reason to run gitosis when there's gitolite, even for a single user. Either is definitely preferable to doing things manually, though.

Re: How to set up your own private Git server on Linux

#6

I decided to move all my private repositories to my own server. When you do this, make sure that the server has continuous backups. Also, make sure you still have an offsite backup. Once you figure out what these things are worth, you may realize that you should probably just keep paying Github.

Backups are important, but not that important if it's just a small private Git server. After all, the full history is not only stored on the server, but also on each of the clients.

Re: How to set up your own private Git server on Linux

#7

I decided to move all my private repositories to my own server. When you do this, make sure that the server has continuous backups. Also, make sure you still have an offsite backup. Once you figure out what these things are worth, you may realize that you should probably just keep paying Github.

The backups aren't as important as each git repo is a fully blown code. If your local repo is destroyed, you still have the server copy. If your server blows up, you still have the local copy.

There are many other good reasons for a service like Github, like the excellent collaboration features, the really good repository and history browser or the good bugtracker.

If you don't need those (small team, working alone) but are concerned about uploading your intellectual property to a third party server in a potentially foreign country (depending on your location), then quickly setting up gitosis / gitweb / redmine might be enough for you.

In my personal case, I would really love to use github even for my small team, but I'm too concerned about the legal issues to go ahead with that (and the local installation is plain too expensive).

Re: How to set up your own private Git server on Linux

#8

I decided to move all my private repositories to my own server. When you do this, make sure that the server has continuous backups. Also, make sure you still have an offsite backup. Once you figure out what these things are worth, you may realize that you should probably just keep paying Github.

Server most likely needs to be backuped anyway. Backups not so important for git as for svn because you are cloning repository with history etc.

Re: How to set up your own private Git server on Linux

#9

I decided to move all my private repositories to my own server. When you do this, make sure that the server has continuous backups. Also, make sure you still have an offsite backup. Once you figure out what these things are worth, you may realize that you should probably just keep paying Github.

I thought the point of git was that it was decentralised. So even if the server died, he wouldn't lose anything would he?

You can also stick a git repo on top of Dropbox... There are several articles about how to do this if you do a quick google.

Re: How to set up your own private Git server on Linux

#10

I decided to move all my private repositories to my own server. When you do this, make sure that the server has continuous backups. Also, make sure you still have an offsite backup. Once you figure out what these things are worth, you may realize that you should probably just keep paying Github.

I agree and disagree with you in equal measures. Paying github is no protection against github messing up, in the end you are still responsible for your data and any subsequent loss will be your problem, regardless of the cause of the loss.

So github can be a part of a backup strategy but it isn't a strategy by itself.

Likewise, there are plenty of parties that wouldn't dream of storing their data in a third party repository, it could be compromised, there are at least 'n' github employees that now have access to your data etc.

So there is a need for both options, one where you outsource your headache to github and keep a couple of local copies just in case, another where you do have your own repository that you control with the associated backup mechanisms and a number of off-site copies.

Fortunately github makes it easy to do the former and git itself can make it (relatively) easy to do the latter.

For plenty of people the first is enough. For me it wouldn't work, so I'm really happy this got posted.

Post reply on HN