Live data from Hacker News

Self-hosted Git Server

petekeen.net

21–30 of 62 posts

Re: Self-hosted Git Server

#21
post #7

Also check https://github.com/takezoe/gitbucket Installation is as easy as downloading it and running: java -jar gitbucket.war

Disingenuous. What happens when you need to restart your server because of some extreme necessary security patch? How do you manage backups? Since it's running on java, you probably don't want to expose this server to the internet unless you actively want to maintain updates to JDK versions. So now you're on the hook for that. Self-hosting is never "simple".

"Since it's running on java, you probably don't want to expose this server to the internet"

Is latest versions from tomcat/jetty/etc. really known for having major security holes? More so than apache/nginx/etc.

Maybe you are confusing the recent Java applets security issue with Java in general. Java has got to be one of the most well funded and developed technology out there, due to peoples reliance to it in enterprise.

People also don't normally run their Java web server as root which adds a bit more security. If there is something about Java security that makes you so worried, I would love to hear about it. As it will probably be news to me.

Re: Self-hosted Git Server

#22
post #21

Earlier quoted context omitted.

Disingenuous. What happens when you need to restart your server because of some extreme necessary security patch? How do you manage backups? Since it's running on java, you probably don't want to expose this server to the internet unless you actively want to maintain updates to JDK versions. So now you're on the hook for that. Self-hosting is never "simple".

"Since it's running on java, you probably don't want to expose this server to the internet" Is latest versions from tomcat/jetty/etc. really known for having major security holes? More so than apache/nginx/etc. Maybe you are confusing the recent Java applets security issue with Java in general. Java has got to be one of the most well funded and developed technology out there, due to peoples reliance to it in enterpri…

Some of the exploits that target applets also affect running servers. Tomcat or Jetty or WebLogic from two years ago are likely compromisable pretty easily.

Any web server has the same issue, and most people are more than fine if they update somewhat regularly. Whether node or rails or whathaveyou, you need to keep updating.

My code on github from two years ago is as secure now as it was then, because someone else has taken on the onus of playing security-update wack-a-mole for me. That's all I meant; I didn't mean to imply java was less secure by default than any other thing listening for connections on the internet.

Re: Self-hosted Git Server

#23
post #5

Sorry about the occasional 502s. I added a smattering of caching to the project pages so it should be better now.

This is my point exactly. Self hosting is maintenance. In the time you got 502s, my github pages stayed up. It is grossly inefficient to host your own source control.

Libraries and third party services exist for a reason.

Re: Self-hosted Git Server

#24
post #5

Sorry about the occasional 502s. I added a smattering of caching to the project pages so it should be better now.

This is my point exactly. Self hosting is maintenance. In the time you got 502s, my github pages stayed up. It is grossly inefficient to host your own source control. Libraries and third party services exist for a reason.

Life is built of tradeoffs and compromises. For you, github pages makes total sense. For me, not so much. Saying that my little VPS is "grossly inefficient" compared to your GitHub repositories is like comparing apples to... I dunno, like a rock? or a monkey? Something else entirely, that's for sure.

Re: Self-hosted Git Server

#25
post #21

Earlier quoted context omitted.

"Since it's running on java, you probably don't want to expose this server to the internet" Is latest versions from tomcat/jetty/etc. really known for having major security holes? More so than apache/nginx/etc. Maybe you are confusing the recent Java applets security issue with Java in general. Java has got to be one of the most well funded and developed technology out there, due to peoples reliance to it in enterpri…

Some of the exploits that target applets also affect running servers. Tomcat or Jetty or WebLogic from two years ago are likely compromisable pretty easily. Any web server has the same issue, and most people are more than fine if they update somewhat regularly. Whether node or rails or whathaveyou, you need to keep updating. My code on github from two years ago is as secure now as it was then, because someone else ha…

"Some of the exploits that target applets also affect running servers."

This would make sense. It's the same reason why php makes apache or ngnix insecure. They are front facing and have access to the OS filesystem and such.

"I didn't mean to imply java was less secure by default"

Okay gotcha. I work with Java quite a bit and was confused by your statement as I thought I missed some major security news.

Re: Self-hosted Git Server

#26

Earlier quoted context omitted.

I still use GitHub quite a lot, but I've started using a private installation of GitLab[1] for private projects and I quite love it. So far, I've only been using it for myself, so I'll admit I haven't really touched the collaborative features, but it does seem to have a lot of the nice features from GitHub. https://www.gitlab.com/

For those of you on Windows, Bonobo[1] is a good alternative. [1] http://bonobogitserver.com/

I wonder how much effort it'd take to get git+ssh:// transport working with that server.

Re: Self-hosted Git Server

#27
post #11
post #10

Earlier quoted context omitted.

Is branding the biggest reason for hosting your own git server?

For me personally, I guess the biggest reason is being able to control the user's experience, as well as my own. Plus I think it's neat, and it was a fun project to do on a Sunday afternoon :)

FWIW, without an easy way to browse the code online or report bugs, I'd currently consider that a poor experience compared to GitHub. Of course that would no longer apply if more functionality gets added...

Re: Self-hosted Git Server

#28
post #8
post #6

I spent years out in the woods with my own projects page that nobody could find and very few cared about, happily cutting trees down with nary a witness. I wanted control over backups, presentation, availability. I was terrified of relying on services that could disappear. I found self promotion distasteful, and I was happy to do the work just for its own sake, for the enjoyment of that process. But then I wrote some…

Honestly, I'm not super concerned about GitHub disappearing in a puff of octocat ink one day. I know they're around for the long haul and I think they've done great things for open source. No, I'm more concerned about branding. If someone comes to my site and I direct them somewhere else, I lose them. If they stay on my site and browse around, my site's look and feel is indelibly linked with my code, my projects, and…

Someone did an article on HN recently where they were taking back their branding back from various social media outlets. They essentially just added some redirect urls. So domain.dom/plus went to their Google+ page, and domain.dom/fb went to their Facebook page. These URLs would be on their business cards or any place they would put up a link.

Similarly, with something like github, you can still continue to use your domain. You check your web page into a branch "gh-pages" but people access that by visiting projectname.dotname.dom and won't really know they're hitting github (unless they're checking dns records). You can put your `git clone` instructions on your pages, as well as direct download links for releases.

The only thing you might direct people to github for would be issues, but all the description, documents, download links, etc would be under your domain.

Re: Self-hosted Git Server

#29

Here's another example, using Ansible and a few simple roles from Ansible Galaxy: https://github.com/geerlingguy/ansible-vagrant-examples/tree... Give Vagrant + Ansible about 15 minutes, and you'll have a nice little local GitLab server running. Modify the Ansible playbook slightly, to point it at a VM on Digital Ocean or elsewhere, and you'll have a nice little hosted copy of something like GitHub. I run an instance…

I've been playing with this same setup for the last two weeks at work. I've got our full dev server config in ansible and stored in a repo that has a post receive hook that self-runs the playbook, and an instance of git lab running in a container and routed via nginx.

Gitolite is pretty robust, but after setting it up I kept on thinking of features I would like or need and I realized I was just rewriting git lab :) there are some docker images that make setting it up cake, and a full installer available for centos and Ubuntu.

Also I think I've used some of your roles off galaxy :) thanks for writing them haha

Re: Self-hosted Git Server

#30
I checked out this guy's site. I understand he is reinventing the wheel. I respect that and do not mean anything negative about that. A lot of us are here to understand the wheel and build for ourselves. There is good value for that.

What I do not understand, with all due respect, is the value of Github, and to a lesser extent Bitbucket, is in the features outside of the VCS core and how most people realize there is nothing Git-like to replace the actual project management tools where people find Github value. That is, bug tracking/issue tracking is the killer feature.

To self-host this is problematic. This is not to say there are not good solutions. Traditionally that is Bugzilla, Trac, Redmine, and more recently a la ArchLinux and Music Player Daemon (MPD) I have seen Mantis BT. It looks interesting. The problem is, as others point out, maintenance, and adding the centralized to the decentralized, thus the point of Git, Mercurial, and others. I noticed this guy hosts his own repos (I tried links to bugsplat.rb) and it did not load, but I assume there is not bug tracking, despite the name.

Even this year, I decided to look into the state of DVCS integrated bug tracking. Very few tools exist, or many have problems. BE, bugseverywhere, kind of exists and has seen contributions as of last year. Ticgit was forked to ticgit-ng, but ironically that is a Github project and its bugs are in the Github issue tracker. There was a very cool Perl project, which seems abandoned, called SimpleDefects (SD), which also wanted to do distributed bug tracking. It was going to sync with Github and other issue tracker systems with decentralizaton, so you could git pull for bugs as well. This one has not seen updates for years, as I can tell, but might be the coolest of them.

Unfortunately, keeping you whole project decentralized is difficult. I have begun to look into fossil again, despite what people here say, because it might be ugly, but no VCS has its own bug tracker or wiki integration, all written in C. It is the SCM and bug tracker for Sqlite, Tcl, and even for all of NetBSD packages. The last really surprised me. I think for the little guy, that is ideal. Monotone might be worth revisiting (I had multiple problems 3 or 4 months ago because it was embedding Lua and they had not come up to the 5.1-5.2 API changes and builds failed; everyone is hard to find), even with the only data about it is there page and links to snarky Linus Torvalds jokes about the horror of OO data structures and modern C++ programming for a SCM.

In short, you should know to host your own Git repos (they are designed, with the native package tools in Git or others) to host simply on a website. It is best for even the lowest footprint web servers, shared hosting or not.

What git does not have, is the beautiful features that keep people on Github all day. I really wish distributed bug tracking advanced, but no one is interested. This topic only comes up when Github is down (or maybe in this case but Github is having publicity problems today). If people made a good tool like SD, that has its own bug tracking that syncs well with Github or (insert hosted SCM here), that would be fantastic. I could be more relaxed, principally, by relying on such tools.

Back to read the Fossil manual.

Post reply on HN