
GitBucket: A Github/BitBucket clone in Scala - hrjet
https://github.com/takezoe/gitbucket
======
Shish2k
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...

~~~
lynchdt
It would be a great way of learning Scala.

~~~
hrjet
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](https://github.com/ornicar/lila)

~~~
cefstat
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).

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

[http://takezoe.blogspot.jp/2013/09/gitbucket-15-released.htm...](http://takezoe.blogspot.jp/2013/09/gitbucket-15-released.html?m=1)

It's a near clone of GH.

~~~
Heliosmaster
maybe even a tad too much. But neat indeed.

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

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

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

[1] [http://gitlab.org/](http://gitlab.org/)

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

~~~
actionscripted
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/...](https://github.com/gitlabhq/gitlabhq/blob/master/doc/update/6.0-to-6.1.md)

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

~~~
sytse
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...](https://github.com/gitlabhq/gitlab-
recipes/tree/master/install/gentoo)

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

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

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

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

------
alyandon
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](https://github.com/takezoe/gitbucket/issues/112)

Edit3: Repository is corrupt. :(

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

------
jheriko
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?!?)

~~~
rfnslyr
Sourcetree? Tower?

------
joeblau
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...](http://takezoe.blogspot.jp/2013/09/gitbucket-15-released.html?m=1)

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

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

~~~
hansgru
> 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)

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

------
royjacobs
Wow, it has precisely one unit test.

~~~
skrebbel
Nice first HN comment, sag!

~~~
royjacobs
Well thanks, I feel very welcome.

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

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

------
pestaa
Would love to look at some screenshots and judge usability.

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

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

~~~
hrjet
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/](http://mbeddr.wordpress.com/blog/) An
Embedded C DSL, built using MTS.

~~~
yreader
You mean MPS [http://www.jetbrains.com/mps/](http://www.jetbrains.com/mps/),
not MTS, rt?

~~~
hrjet
Right, thanks!

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

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

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

------
Ygg2
How does this communicate with git?

~~~
wtetzner
Looks like it uses JGit.

------
justinholmes
Shame the test directory only contains one test

------
azhar5012
Will it make learning Scala easier than ever

------
Nux
Super nice! Shall deploy it.

