Browsed by
Category: git

Mirror Bitbucket Server to gitolite

Mirror Bitbucket Server to gitolite

This is about how to mirror git repositories from Bitbucket Server to gitolite (read only).

What’s the matter?
This setup can be tremendously helpful if your Bitbucket Server is not reachable from a node where you want to deploy code via git. Or you need some sort of redundancy.
In this case gitolite has several advantages over another Bitbucket Server instance:

  • super light weight
  • therefor, a minimal footprint in terms of hardware resources
  • easy to set up (if you know how)
  • easy to maintain, very stable
  • you don’t need a Bitbucket Data Center license

What’ required for this setup:

  • a node with gitolite3 installed and setup. For this guide we assume the hostname is ‘gitolite’
  • a node with Bitbucket Server installed and setup. We assume the hostname is ‘bitbucket’
  • the Bitbucket Server plugin “External Hooks” (it is free), install as usual
  • Bitbucket must be able to “talk to” gitolite via ssh (check your firewall)

I won’t cover the installation and the basic setup of Bitbucket, just the steps needed to establish the mirror link between Bitbucket and gitolite.

Read More Read More