Live data from Hacker News

How to Host Your Own Private Git Repositories

eklitzke.org

11–20 of 114 posts

Re: How to Host Your Own Private Git Repositories

#12

Why do this when http://bitbucket.com will host private git repos for free? They also have have Large File Storage implemented as well. I use GitHib client using BitBucket for repo hosting with LFS and it works great, no need to host anything.

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

Re: How to Host Your Own Private Git Repositories

#13
I do self-host a few repositories as well, but I do not set up a separate user: I just create a git/ dir in the home dir of the account I want to host the repositories on and put the repositories there.

To simplify the initial setup, I created a handy shell script, reposetup [1]. It makes to create repositories, push to them and remind me their urls.

[1]: https://github.com/agateau/reposetup

Re: How to Host Your Own Private Git Repositories

#14

Why do this when http://bitbucket.com will host private git repos for free? They also have have Large File Storage implemented as well. I use GitHib client using BitBucket for repo hosting with LFS and it works great, no need to host anything.

Hosting it yourself means that you don't have to muck with LFS. Want to check in a 7GB file? Go right ahead.

Re: How to Host Your Own Private Git Repositories

#15

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

Re: How to Host Your Own Private Git Repositories

#16
post #8

This is a good setup if you are the only one accessing the repo. If you need something a little bit more complex, I would highly recommend gitolite for managing repositories & users. Configuration is done via some INI/TOML-like files in a git repo. User public keys are stored in the same repo.

gitolite has amazingly powerful access control, not just per-repo but per-branch or per-directory within a repo. It has very flexible self-service features, if you are OK with remote commands over ssh. Lots of nice scripting hooks.

Gitolite home page: http://gitolite.com/gitolite/

I run a multi-tenant gitolite setup for the University of Cambridge: https://git.csx.cam.ac.uk/

Re: How to Host Your Own Private Git Repositories

#17
post #3
post #2

I've been using Gogs happily for two years: https://gogs.io/docs/installation

Eh. The method described in this post (ie bare repositories on a filesystem and ssh transport) is perfectly sufficient for my personal use if I'm hosting. The minute there's a MySQL dependency I'm a hard pass... I buy the need for the gitlabs of the world when multiple users show up, if only because managing credentials is a pain. But for single user use cases I wouldn't waste my time.

> I buy the need for the gitlabs of the world when multiple users show up, if only because managing credentials is a pain.

gitolite has worked well for small multiuser teams for me. No difficulty with managing credentials and no need for a heavy solution.

Re: How to Host Your Own Private Git Repositories

#18

Why do this when http://bitbucket.com will host private git repos for free? They also have have Large File Storage implemented as well. I use GitHib client using BitBucket for repo hosting with LFS and it works great, no need to host anything.

Hosting it yourself means that you don't have to muck with LFS. Want to check in a 7GB file? Go right ahead.

LFS is a tool to use to avoid checking in 7 gb files. If you want to weigh down your repo with binary bloat, don't configure your repo to use LFS.

Re: How to Host Your Own Private Git Repositories

#19
post #8

This is a good setup if you are the only one accessing the repo. If you need something a little bit more complex, I would highly recommend gitolite for managing repositories & users. Configuration is done via some INI/TOML-like files in a git repo. User public keys are stored in the same repo.

I second gitolite. It was great for preventing force push by newbies :)

Re: How to Host Your Own Private Git Repositories

#20
post #8

This is a good setup if you are the only one accessing the repo. If you need something a little bit more complex, I would highly recommend gitolite for managing repositories & users. Configuration is done via some INI/TOML-like files in a git repo. User public keys are stored in the same repo.

What about Gitlab? Isn't that more popular than gitolite?
Post reply on HN