I have a few private Git repositories on Bitbucket that I need mirrored locally behind a firewall so we can use gerrit with them. The goal is that every time there is a push to the clone, the clone then pushes the new refs to bitbucket, and vice versa.
To mirror changes from Gerrit to Bitbucket, you could use replication.
To mirror changes from Bitbucket to Gerrit, there are a couple of different options. The easiest way would be to have a cron job or other scheduled task that polls the Bitbucket repository for changes and then updates your Gerrit repo. If you want to set up a more efficient "push" method, you'd need to configure a POST Hook on your Bitbucket repository that triggers some kind of web service that pulls the changes down and pushes them in to your Gerrit repository.
I wrote a little bit more about one way you could handle two-way mirroring in this answers post: https://answers.atlassian.com/questions/325269/move-changes-from-disconnected-stash-repositories
Thanks for the response. I'll try this out. Seems like the simplest would be a single cron job that runs the pulls and pushes in both directions. I might try that first to see if this works and doesn't create too much load on any servers before trying something more complex. I'll get back to you with my results.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs