Stash replication?

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

Sure it is possible. The are some plugin:

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.

Is that possible at all?

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

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.

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.

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.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

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

23,103 views 26 12
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you