Hacker News new | past | comments | ask | show | jobs | submit login
GitBucket: A Github/BitBucket clone in Scala (github.com)
123 points by hrjet on Oct 4, 2013 | hide | past | web | favorite | 107 comments



Somewhat meta, but why are so many stories on HN "<existing product> written in <different language>", and not "<existing product> with <interesting new idea>"?

It's quite possible that gitbucket is better than github or gitlab for some reason, and if so I'd like to know that reason; "It's identical on the surface and different under the hood (not necessarily better, just different)" doesn't seem like a particularly great way to generate interest...


In this case, "written in Scala" is already interesting new idea. By the fact it's written in Scala, I already know that it can be run on standard JVM application server stack, that it will need less resources than your standard Ruby implementation and be much more performant and cheaper to maintain if installed locally.


Because most of us are developers, the medium of a software product is considered interesting as well as the finished product. This should hardly be surprising and I'm glad there's a forum whose interests span beyond an ends-justify-the-means approach to software.


> the medium of a software product is considered interesting as well as the finished product

I get that, and I find things like the demoscene interesting where the medium is a large part of the value -- but in this case (and most cases when stories like this are posted) it seems like a serious business product, where the medium is an implementation detail - the value is in other things like "open source" and "easy to install"


For anyone who's tried to setup and run Gitorious, an "easily installable" version of anything like it (eg a Github clone) is particularly attractive.

As mentioned, when I see "written in Scala", the implication is you ./sbt package it into a WAR, then stick it in a standard servlet container, and voila, up and running. In Gitbucket's case you don't even have to package it, just download the war.

So for a bunch of coders who may want to run a repo service on their internal network, employer or client's network, this is an interesting option.

Also it's FOSS, which I upvote by default here, be it from Mozilla or a random hobbyist.

PS - Not to bag on Gitorious, great FOSS project and much improved install as of late.


If they're trying to attract users you are certainly right. But if they're trying to attract developers/contributors (which seems plausible for a new project), language choice certainly matters.


From my very brief look at GitBucket, at least one thing jumps out at me: ease of install. Just drop one .war file in a directory and go.


You can do that with JRuby as well. I believe that's what you get with Github Enterprise.

But yeah, anytime we have ease of install, we all win.


GitHub enterprise comes only as a VM now. Every release for the past year has had upgrade problems or significant bugs. It's amateur hour compared to the public version.


Oh that's a real shame. They charge so much for it too.


Many stories are submitted, but the ones in that form seem to get upvoted more, I suspect because fans of that particular language upvote them (certainly the go ones seem to get a disproportionate boost).


I guess the major advantage of this solution over github is its source availability under a FOSS license (Apache).

The story's title might indeed be more informative by stating that instead of focusing on the implementation language.


Advertising the language is valuable if you speak that language. It's a large codebase for a complete product that you might want to peruse to learn something about how a large project in that language could be built.


as a developer, i don't need them to be different than each other as they are mostly open source so i can take a good look at what they have done, how they've done it and many other things. i'd like to think such applications as showcase apps for the languages

as a prospective user, having this web application up and running somewhere and showing it would be much more compelling to me.


It would be a great way of learning Scala.


OP here. This is one of the reasons to mention Scala in the title. Not just Scala, but also an opportunity to learn frameworks like Scalatra.

I was actually evaluating different Scala frameworks and stumbled upon this project as well as another neat one: https://github.com/ornicar/lila


Although I understand your motivation, when I see "clone of X in language Y" I think that this is something being hyped only because of the choice of language and not because of the project's actual merits.

In the case of GitBucket the most important advantage is its easy installation, especially when compared to the more well known GitLab (that I never dared install after reading through the installation instructions).


> It would be a great way of learning Scala.

For me it is :). I started to learn Scala after finding this nice project. Since it was so easy to install it (just copied the WAR file in a running Tomcat) it made me curious enough to give Scala a try and also to buy the Scalatra book too :).


Am truly impressed with this project. For those who are looking for screenshots-

http://takezoe.blogspot.jp/2013/09/gitbucket-15-released.htm...

It's a near clone of GH.


Way too similar. People should come up with new ideas instead of cloning someone else's work.


But if a UI works and is not copyrighted? I am against a scarcity mindset where we have to reinvent the wheel. Naoki has saved time and spent it more productively on the codebase and then released it as an OS product, good.


I agree, we shouldn't reinvent the wheel but it applies to "host of repositories" too :). There are already existing solutions so why spend time to build another one? Also when someone builds a product which does and look the same as another and even the name is very similar, it reminds me the Adidos(http://bit.ly/1aRN2IN) shoes. My point is at least make a different UI and choose a name which closes out confusion.


Adidos? I raise you with Lodidas :)

I know there are other solutions like Gitlab, but from what people are saying here, it is harder to setup & maintain, so I do not feel that this particular product does not bring something new.

Maybe create an open source GitHub/Bitbucket UI that people can use in their projects?


Heck they stole most of their name from BitBucket: https://bitbucket.org/features

And BitBucket was an attempt to steal GitHub's business primarily with Mercurial at the time, that Atlassian bought up, and since then GitHub has still been their #1 competitor, (not counting Sourceforge).


BitBucket and GitHub both launched in 2008, as far as I can tell. So I wouldn't say BitBucket was an attempt to steal GitHub's business.


Oh, come on. Bitbucket and GitHub both emerged at the same time; neither is a copy of the other, nor do GitHub's founders think that.


maybe even a tad too much. But neat indeed.


Agreed. I like the idea, but the buttons, issue tracker, etc are all a bit too similar for my liking.


All projects using the default Twitter Bootstrap styles look very alike :). One could of course using one of the many Bootstrap UI Builders generate a totally different look, but so far nobody volunteered :).


Yes. But needs some improvement


I like the idea of having your private Github. Relying on some company far away to keep their servers running (while having a bullseye for DDoS painted on itself it seems) for larger commercial projects always turned me off a bit.


Check out GitLab[1] - it's pretty well developed and recently hit v6.

[1] http://gitlab.org/


I love GitLab but it is too time consuming to maintain. Once a month you have to manually update it and you can't skip updates. The update process can take from 15 minutes to hours should any problem arise. I know since I have performed all updates from 2.3 to current version.

It is great but due to the update situation and the resources it needs (amount of RAM), I think it targets mainly groups and not individuals.

Give me a lightweight, one command, free software alternative with 60% of GitLab's feature set and I will be a happy man.


I'd like to offer a counter experience where the upgrades are pretty simple: stop, git pull, rake a bit, update a few configs (maybe), start. It's certainly not trivial or painless, but it isn't that bad and it's nice that they're releasing regularly (22nd of each month, I believe).

I agree that it is absolutely meant for groups more than individuals. We use GitLab like crazy in the office, but we also have GitHub accounts for community contributions and BitBucket accounts for private/personal stuff.

Edit: see their 6.0 to 6.1 release notes for more: https://github.com/gitlabhq/gitlabhq/blob/master/doc/update/...


Most of the updates aren't bad, indeed. But there are issues.

For example at first we had to install gitolite as well and update it. Then we switched to gitlab-shell, so we had to make the switch and now update this as well. There was resque and then there was sidekiq. There was unicorn and then it was replaced by puma and now it is replaced once again by unicorn. At some point those of us who used sqlite could not migrate to mysql when sqlite was dropped. Also more than once, when I was quick to update I ran into problems and had to spend hours in search of a solution. Nowadays I update near the end of the release cycle to avoid such issues. I am on gentoo, so I have to create and adjust my own init scripts. I use apache, so I have to figure that out as well.

All these I guess can take anywhere from 10-24 hours per year, which can't be justified for one person. For a team it is ok.

As for gitbucket, I gave it a try and it only supports git access through http and even there it can't give read only acces to private repos. Any account that has read access, has also write access to a private repo, which makes it useless for deployment.


Hi andmarios,

GitLab co-founder here. Thanks for commenting and informing people.

For those interested a bit of background. Replacing gitolite with gitlab-shell in GitLab 5.0 was a painful step that we did not take lightly. It enabled GitLab to perform much better (100x faster on some operations) in larger installations (1000+ repo's). It also greatly reduced the moving parts and installation problems people experienced.

We tested Puma on GitLab cloud for weeks to see if there where issues but after the switch we ran into big problems so we had to go back to unicorn. The other transitions have similar stories. We try to be careful but we want to end up with a great solution so sometimes we have to make hard choices.

I'm sorry we don't have the resourced to provide official support for Gentoo, everything we have is in the user contributed gitlab-recipes https://github.com/gitlabhq/gitlab-recipes/tree/master/insta...


Maybe you can try RhodeCode supoprts both hg+git and it's super easy to upgrade. https://rhodecode.com https://secure.rhodecode.org/rhodecode-enterprise



He said 'alternative', meaning something that will provide UI to Git. Proposing solution based on another SCM is not really an alternative, it's a completely different thing.


It's a nightmare to install in Windows though. This is much easier. Drop the WAR file and then type in 1 command to run it.


I agree that the weakest point of gitlab is ease of installation


Also exists as a nice n easy turnkeylinux package - I use it for all of my private repos http://www.turnkeylinux.org/gitlab


I installed that about a month ago as I was having issues installing GitLab on a fresh Ubuntu installation. Trying to upgrade to the latest version is a massive ball ache. It completely messed up.

Eventually I installed myself. Everything works great now, although I had a couple of hiccups when trying to upgrade to a beta (that'll teach me).


I'm reasonably proficient in Linux, but lost hours trying to install (intent was a greenfield upgrade) Gitlab on clean Ubuntu instance.

The drop-in-and-run WAR stuff is the greatest thing ever (I'm using Gitblit).


GitHub Enterprise is self-hosted, FYI https://enterprise.github.com/faq


> GitHub Enterprise is self-hosted

It is, but it costs more than many small teams can afford.


That's why it's called enterprise


gitlab (already linked in the other comment) and

https://rhodecode.com/

https://secure.rhodecode.org/rhodecode


RhodeCode does Git AND Mercurial and not "just" only Git. A big pro for me.



I like stash and have been a paying customer since last year. As far as I know, it is written in Scala too (the plugin API docs had a Scala flavour when I last looked at them).

I especially like its Pull Request interface. It separates out the changes into a file tree, which appears as a pane on the left. Makes it much easier to review large PRs.

The only hitch is, Atlassian has very opinionated product managers. I (and a bunch of other users) had to convince them to support "forks" over a long JIRA thread!


> As far as I know, it is written in Scala too (the plugin API docs had a Scala flavour when I last looked at them).

?? Their source code is downloadable to us since we have a license, but I've not checked. Everything else Atlassian purchased has been Java, afaik.

And Atlassian's only opinionated project manager I know about is Jens who does Stash, so I think you are generalizing to apply that to all of Atlassian. I've been using their products a long time now and he is the first that has been like that, but I know what you mean. He doesn't really meet up with Atlassian's typical level of customer service because of his attitude, but maybe he's a "rockstar" that deserves respect.


I would like to clarify that support for Forks was on our roadmap from day one. It was merely a matter of time and priorities to get it implemented as can be seen on the issue discussion: https://jira.atlassian.com/browse/STASH-2495

The core of Stash is actually written in JAVA, with only few plugins being implemented in Scala. But that number will likely grow going forward.

You are probably right that some of us are slightly opinionated. But as was pointed out before, I believe product managers should be opinionated as long as the opinions are formed by knowing your customers and market extremely well.


> Atlassian has very opinionated product managers

I'd say that's a good thing. A product can't be all things to all people and when it tries it ends up as a big hogde-podge of compromises that make no-one happy (either that, or being a beast to configure, thus making support painful).

Now, I don't know what the particular issue over forks are (related to branches?) and whether it's reasonable, but the fact that they were eventually convincible only makes it seem better.


In general I agree, but "forking" would be considered as a very essential feature by many in a product like Stash. I don't think dozens of users were needed to argue that it be included.

Another example of a crazy bug/feature in JIRA: https://answers.atlassian.com/questions/84349/rapid-board-ti...


> As far as I know, it is written in Scala too

Nope, it's all Java. It uses the same stack as our other products.

It shares the standard Atlassian plugin framework, which allows users to write plugins in Scala, but the product itself is all Java.


After yesterday, installing Satis (server for composer packages) jumped almost to the top of my list, been unable to access composer for a big chunk of the day could have been a real problem on the wrong day.

I use Bitbucket for my repo's (with mirrors on my servers) as I actually prefer it (and you can have unlimited repo's < 5 users) so it was a pain to have a dependency on github as well.

Single points of failure suck.


For a private BitBucket (Mercurial only) check out HgLab: http://hglabhq.com

(edited link)


I really wish this wasn't restricted to Windows servers... it's too bad, cause I doubt GitLab is planning on mercurial support anytime soon.


For Unix and Windows support with both and Git,Mercurial you can try RhodeCode also. https://rhodecode.com https://secure.rhodecode.org/rhodecode-enterprise


Yeah, I get that a lot. Theoretically, this is possible by supporting Mono and switching to PostgreSQL/MySQL. Practically, given my limited resources, this is not something I will be able to do in the nearest future.


What?

Can't you just add a new remote, push and bang, your code is now there? You should always have a full (hopefully up to date) source somewhere so incase github/bitbucket/remote provider - even your server if you host locally on gitlab etc - catches on fire you always have a spare.


Are this kind of full clones legal?

I understand that the server-side implementation is based on GitHub as a black box but I'm wondering about the blatant clone of the UI.


UI as far as I know is not copyrightable:

http://en.wikipedia.org/wiki/Lotus_v._Borland


Yet we have patents for rubber band scrolling :)

(someone posted a comment here about this scrolling patent but then removed, not sure why)


> Are this kind of full clones legal?

This is not a "full clone" but "something like GitHub" but for your own private server.

> I understand that the server-side implementation is based on GitHub as a black box

No, it's not. The serverside is implemented in Scala using a JGit as a GIT library for the files and H2 database for saving the metadata.


Thanks. Just to be clear, I appreciate the effort and do not say it was something illegal to do.

I was just wondering about theoretical consequences of cloning UI/tool of a successful company software with the reason of the tool/interface being too expensive.

If it's done for learning the technologies then it's "for educational purposes" and probably falls into another copyright use category that is more permissive.


> I was just wondering about theoretical consequences of cloning UI/tool of a successful company software with the reason of the tool/interface being too expensive.

The UI was not cloned either :). The UI is a Scalatra template (Twirl) and a Twitter Bootstrap style. It could be customized in any possible way and look the user would wish, but so far the developers are concentrating on the basic features.


> No, it's not. The serverside is implemented in Scala using a JGit as a GIT library for the files and H2 database for saving the metadata.

From a quick scan of the sources, H2 seems to be an hard-coded dependency. Do you have any plan on abstracting the Slick driver to allow others DB providers ?


> Do you have any plan on abstracting the Slick driver to allow others DB providers ?

I'm not the developer of the project, but database independence was not requested so far :). I suppose if users will ask it, it will be added. H2 suits however very well all the needs, it has a web based Admin UI that can be simply reused, and it's performance is fantastic: http://h2database.com/html/performance.html


Note that this is hosted on GitHub and not GitBucket. I made the mistake of thinking that the linked site was a running instance.


This looks like a lot of effort has gone into it and I eagerly await support for ssh & https.

We have an internal instance of GitLab set up here at work and I'd love to see something that was easier to upgrade take its place.

Edit: I just tried to import a large code base with a pretty lengthy history and managed to bring the entire service down.

Problem accessing [snip]. Reason:

    Timeout trying to lock table "ACCOUNT"; SQL statement:
select x2."USER_NAME", x2."MAIL_ADDRESS", x2."PASSWORD", x2."ADMINISTRATOR", x2."URL", x2."REGISTERED_DATE", x2."UPDATED_DATE", x2."LAST_LOGIN_DATE", x2."IMAGE", x2."GROUP_ACCOUNT" from "ACCOUNT" x2 where x2."USER_NAME" = ?

Edit2: Seems someone already reported it https://github.com/takezoe/gitbucket/issues/112

Edit3: Repository is corrupt. :(

Edit4: No it isn't - hurray git :)


this is totally uninteresting to me - there are tons of services providing hosting to go with the software used for hosting.

what i really want is a source control client that doesn't suck. that is a problem which actually needs solving and where there is a potential market to steal from perforce...

(why do i not just make this?!?)


Sourcetree? Tower?


I don't 100% understand this project. From the screenshots [1] it looks exactly like GitHub so why would I want to use this product over GitHub, GitHub Private, or GitHub Enterprise? Both GitHub and Bitbucket are community, pages, hosting, public repos, third party integration, new features, innovation and support. While this looks like a cool programming challenge, I need to be sold on why I should use it as a product.

Edit: Someone pointed out that they may be looking for developers to hack on the project which makes sense.

[1] - http://takezoe.blogspot.jp/2013/09/gitbucket-15-released.htm...


It's open source. You could fork and add more features to it. For example, I am going to try and add a file navigator in the PR interface. Another is, voting for an issue without adding a +1 in the comments. This is the biggest pain point in GitHub for me.


> I need to be sold on why I should use it as a product.

What about self-hosting for public and private repos? (Internet or intranet)?

It's main usage is for small teams and projects that don't want to put theirs source on external servers, nor do have the money for GitHub Enterprise.


There are already multiple established solutions (which are noted in other comments) that are free, paid, open-source and closed source with large communities that solve this problem. At my last company, we had an Ubuntu machine running our git-server and it solved the issue you're saying.

Edit: You know what would make this awesome. If this project could some how extend GitHub via the API and somehow replace GitHub when it goes down. Sort of like a private HA solution to GitHub incase of an emergency. Now THAT is something that I'd look at and say "okay this solves a new challenge with the current state of hosted Git platforms."


> There are already multiple established solutions

Of course there are, but everything I've tried was a paint to setup. GitBucket was the first project that was very easy to setup: in an existing Tomcat (or other container), just drop the WAR file, and everything works. Also no dedicated machine is required for this (I host it along with other applications)


For testing you can even run it with 'java -jar gitbucket.war', and five seconds later you have it up and running.


Ease of install is a feature that I can definitely appreciate.


For example when you don't want to rely on GitHub being available/online? Or if you just don't trust 3rd party service providers with your data?


This project is marketing the community aspect, not the availability of privacy aspect. This doesn't provide any better availability/privacy than GitHub Enterprise or GitLab and it doest provide anymore trust than those two services. If you're looking to learn Scala or hack on an open-source Scala project, then I could see why this is cool.


Wow, it has precisely one unit test.


Unit tests are a means to an end, and scala makes that end easier to achieve with fewer of them.


Nice first HN comment, sag!


Well thanks, I feel very welcome.


Is there an equivalent for github's ssh key lookup - which used to be based on mysql, but is now based on a web service talking to mysql using persistant connection pools.


Every time I see a github project for installable software, the first thing I want to see is a screenshot. I realize that's shallow, but it is what it is.


Would love to look at some screenshots and judge usability.


I am not the author nor have I tried it yet myself. Still downloading the war (yeah I am on a slow wire).

But it's hugely appealing that 1. It's written in Scala. (A language I am familiar with) 2. It's packaged as a single file; download and run. I like single file installs. YouTrack by JetBrains is another example.


I'd missed YouTrack (which considering I adore phpstorm and pycharm is annoying), it looks excellent :).


YouTrack is neat. Keyboard shortcuts for everything, well thought out interface. And it is implemented in this new meta-language called MTS.

MTS is a topic unto itself. Check out this for example: http://mbeddr.wordpress.com/blog/ An Embedded C DSL, built using MTS.


You mean MPS http://www.jetbrains.com/mps/, not MTS, rt?


Right, thanks!


The JetBrains guys build incredible products and have a wide range of products all of which seem to be updated on a very regular basis, they are some intimidatingly efficient developers :).



To say it was heavily inspired by GitHub would be an understatement.


Agreed. Often times things that sound useful are posted here, but I don't really feel like I need them (not necessarily the case here). A screenshot could create that need :-)


This is fascinating b/c Github initially provided a powerful UX for something that is actually a p2p system.


Any idea how fast it is? GitHub have put a considerable amount of effort into a very fast implementation.


> Any idea how fast it is? GitHub have put a considerable amount of effort into a very fast implementation.

From my tests, is usable. I'm using in the intranet, and have an installation with 20 users and 15 repos so far, with ~100MB each at the moment.

However, this project is not targeted as a GitHub replacement (massive hosting with many huge repositories), but toward small teams that need a UI and simple admin for their Git repos and aren't allowed (or don't want) to use an existing cloud service, or don't have the budget for the GitHub Enterprise.


How does this communicate with git?


Looks like it uses JGit.


Shame the test directory only contains one test


Will it make learning Scala easier than ever


Super nice! Shall deploy it.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: