I am in the process of finally rolling Mercurial as our version control system at work. This is a huge deal for everyone as, shockingly, they have never used a VCS. After months of putting the bug in management's ears, they finally saw the light and now realise how much better it is than working with a network of shared folders!

In the process of rolling this out, I am thinking of different strategies to manage our stuff and I am leaning towards using Bitbucket as our "central" repository. The projects in Bitbucket will solely be private projects and everyone will push and pull from there.

I am open to different suggestions, but has anyone got a similar setup? If so, what caveats have you encountered?

  • +1 (a) because I like the question (we're looking at using GitHub as an off-site repository though in addition to a hosted server) and (b) for persisting and getting your company to make a postive change Jun 30, 2011 at 16:04

9 Answers 9


I use Bitbucket for private repository hosting and one of my clients uses private repository hosting on GitHub. Another company I work with uses private repository hosting of subversion on Jira's servers.

Offsite storage of your data, if it's not the only place you have it, can reduce your risk when it comes to disaster recovery. Since you will have physical copies of the source on dev machines, and git and mercurial both keep the entire development history in the local copies, this is now a very viable solution. Unless you have gigabytes of data in a single project, and a sluggish network connection, I highly recommend this option. It's low cost, gives developers a lot of portability and flexibility, and it gives you automatic redundancy.

Depending on your level of paranoia, you may be concerned that having a third party storing your code may expose security risks, but I think that in practice this is no worse than having developers with laptops that can be used off your corporate network. Github and Bitbucket both use SSH to transfer data, so man-in-the-middle attacks have relatively low-probability of occurrence.


I am not a BitBucket user, but I'd suggest reading their terms and conditions with a fine tooth comb. You need to be really sure about their terms of service, data protection and security/privacy if you're going to be storing your companies private projects on there.

I assume you've looked into having a Mecurial 'central/master' hosted on an internal machine?


We did something similar with ProjectLocker at my old job. Honestly, it comes down to a cost/benefit analysis - are you willing to give up the flexibility and costs of running your own Hq/Git/SVN server for the price you will be paying to BitBucket? If yes, then go for it. We never really had an uptime issue, and it was a good experience.


We are not BitBucket users (as a company). We run several legacy systems inhouse (CVS, SVN) and our main repository is a git system with sync'ed caches in outlying offices. From a manager's perspective I would advise against putting your company's intellectual property on somebody else's servers, unless you don't have adequate IT facilities in-house. This code is your company's lifeblood. This should not be about money, but about protecting your IP.


I'd say it definitely comes down to a cost analysis of which is cheaper; running your own server (or a VM instance) or sticking it elsewhere.

Also, if the company already has network shared folders set up, you might want to consider using Git, because you could turn that network shared folder into your 'remote' repository, with something like git init --bare, and the network share permissions would already be in place for the users. Then each user could just add the shared folder as a remote with git remote add origin file:///some/shared/folder (that might not be the exact syntax for a file referenced share, I'd google it for the exact syntax).

I do basically this at home to manage my personal projects; I have a NAS drive on my home lan that has my 'remote' repos on it, then I can get to them from my various PCs and laptops across a Windows mapped drive letter.

  • That's a great suggestion! I'll consider it but I'd like to keep it within Mercurial as I'm much more familiar with it. I'm sure I can do the equivalent in hg...
    – Marlon
    Jul 1, 2011 at 13:49

I join the other programmers on this one: Think hard about giving away your code.

For me it would only be an option to outsource the VCS if you really don't have the manpower and/or knowledge to host your own repository (mean: including backups and maintenance). If you already have shared network folders with regular backups, you could start using them and get the backup without additional cost.


I've used BitBucket for a little while and I've found it is a pretty good service. I don't think there will be any issues with privacy or security.

That being said, if you feel uncomfortable hosting your company's code on someone else's servers, you can set up a mercurial repository to be accessed over ssh on one of your company's servers. See http://mercurial.selenic.com/wiki/SharedSSH and http://blog.mixu.net/2010/10/04/setting-up-private-ssh-based-mercurial-repo-hosting-on-centos/.


Bitbucket is good for open source project.

If this project will be proprietary, I'd suggest hosting your own code. It is not that expensive to host it yourself, if you already have an IT setup. Just find a fair server and deploy your code.

mercurial is easy to configure.

good luck and enjoy.

Mercurial is really nice. Miss it :(


Well for a company I would prefer make sure that the authoritative repo of the project be on a private server, even if you have an always-up-to-date clone on bitbucket, just to be sure.

I would recommand installing Rhodecode on a private local server machine (for quick access), then have a script update bitbucket regularly, if you want. Keep several clones at different places anyway, you never know.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.