Live data from Hacker News

How to set up your own private Git server on Linux

tumblr.intranation.com

11–20 of 66 posts

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

#11

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.

As the author, I can respond to this:

Given the decentralised nature of Git, having continuous backups becomes less important unless all my computers (including the server) fail at once.

But yes, backups are important, and they are done.

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

#13

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.

Git makes it trivial to replicate your repos to more than one directory, no matter where those directories are located.

Whether or not this makes you "decentralized" depends on where your directories live. Two machines in the same location? Not decentralized.

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

#14
post #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)…

In 18 months when you need to a clients project gets deleted and you and find the server version destroyed... well...

Might sound unlikely but it happens.

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

#15
post #14
post #7

Earlier quoted context omitted.

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)…

In 18 months when you need to a clients project gets deleted and you and find the server version destroyed... well... Might sound unlikely but it happens.

it could also happen that github loses data and it's hard to valuate the exact likelihood of you accidentally deleting two repos or github losing a fileserver and its backup.

Also, if github is down or your repo with them is corrupted, you have to go through their support. If your own server has a problem you can fix it instantly.

I'm not convinced that reliability is the correct reason to go GitHub. Features: Yes. Reliability: Not necessarily.

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

#16

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.

As the author, I can respond to this: Given the decentralised nature of Git, having continuous backups becomes less important unless all my computers (including the server) fail at once. But yes, backups are important, and they are done.

If all your computers are in a single location, it's not decentralized in cases of fire, flood, earthquake, or other natural disasters...

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

#17
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!

As mentioned by cdr, "Gitolite" is a spiritual successor to gitosis, and has a lot improvements and new features in management, permissions, and setup.

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

#18

Earlier quoted context omitted.

As the author, I can respond to this: Given the decentralised nature of Git, having continuous backups becomes less important unless all my computers (including the server) fail at once. But yes, backups are important, and they are done.

If all your computers are in a single location, it's not decentralized in cases of fire, flood, earthquake, or other natural disasters...

Or even theft. I lost more than a week's work last year becuase a team member had his laptop, external harddrive, and desktop stolen from his house while he was visiting his parents for Thanksgiving. Whoops. Triple backups don't count if they're all in one apartment.

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

#19

Earlier quoted context omitted.

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.

Git makes it trivial to replicate your repos to more than one directory, no matter where those directories are located. Whether or not this makes you "decentralized" depends on where your directories live. Two machines in the same location? Not decentralized.

Obviously. You can also backup your files to a folder on the same disk, but you wont will you.

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

#20

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 re…

I wrote this little shellscript to backup all my Git repositories on GitHub: http://github.com/avar/github-backup

It runs in cron and backs up all my data daily.

Post reply on HN