Stash replication?

Ivan Varbanov October 30, 2013

Hi guys,

I would like to ask is it possible to run replication between bitbucket to stash? I mean what's ever done in bitbucket to be replicated to local/internal Stash? Is there any way this to be possible? For example in bitbucket we create a new branch and that new branch to be replicated to Stash? Is there any way of doing this?

Thank you.

5 answers

1 accepted

0 votes
Answer accepted
Alexey_Efimov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 5, 2013

Sure it is possible. The are some plugin: https://marketplace.atlassian.com/plugins/com.kostmo.stash.mirror-manager

But you may just setup cron task, that once a 15 mins will perform git pull from bitbucket, and push it to Stash.

We used CI server (TeamCity) for such mirroring tasks. Teamcity monitor external repos and run 'script with git push' to Stash on changes detected in remote repo.

Be carefull to setup cross miroring. From stash to Bitbucket on changes in Stash, and from Bitbucket to Stash on changes in Bitbucket. You must do not allow run thiese tasks in parallel, becose you can loose commits in this case. Especially if you will use push -f.

0 votes
Cathy Sanders October 31, 2013

Right -- which is what we were thinking but if there was even easier ways to do that merge back and get their code integrated back into our master repo, that is a bonus. Not sure what the intial poster of the question had in mind, but the external contractor scenario is one that I could see as being applicable and potentially wanting to use both Bitbucket and Stash.

0 votes
Cathy Sanders October 31, 2013

In our environment, this could potentially be useful when working with external contractors. We don't want to give then access to our internal Stash environment, so being able to tie a repoistory we have set up on Bitbucket for them to use with the internal master copy of the repo could be useful. Most of the time in this scenario we aren't doing collaborative development with the external contractors so don't have the need to get more than major milestone code drops, but this type of functionality could provide an option for tighter collaboration without giving access to our internal systems.

Harry Chan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 31, 2013

Git is self contained. All you need to do is check out the latest copy of the code and give this to the contractors. They can merge it back after if required. Each git clone has the full repository already.

Git unlike SVN is distributed. It's designed this way.

0 votes
Harry Chan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 31, 2013

I would just use Bitbucket or Stash. Is there a reason you need both?

0 votes
Ivan Varbanov October 31, 2013

Is that possible at all?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events