Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Mirror Github repo using bitbucket cloud

I am working on a project that needs to only have the latest from a remote repo, we then  make customized branches from that repo for our specific needs. We do not want to push any updates to the original repo.


I have been able to do this with Gitlab using there repo mirroring feature. I assumed SmartMirror features in Bitbucket Cloud Premium would do this, but I cannot see information on this use-case.

1 answer

0 votes

Hello @Travis Travelstead,

Unfortunately, there's no feature of mirroring repositories hosted externally. Smart Mirroring is about mirroring repositories hosted on Bitbucket Server or Cloud, useful for remote locations with limited internet connection and/or huge repositories.

There might be third party solutions for this, but I'm not aware of any.

project that needs to only have the latest from a remote repo, we then make customized branches from that repo for our specific needs. We do not want to push any updates to the original repo.

Doesn't this mean you can clone remote repository once and then work on that copy?

Cheers,
Daniil

Thanks for the response. 

We are working on a release system, so that we branch from a commit/release of the external repo. But we also want to keep getting the latest so that we can work on with new features and the next release.

We are currently cloning and then working from that clone, but we want to stay connected in one direction to pull and never push. 


This is also helpful because it allows us to setup CI in one location, and build both old and new version in a single place with minimal new work. 

Ok, I see what you mean, thanks.

Well, this unfortunately requires manual fetching from upstream and updating your Bitbucket copy. That said, there's no way to fork/mirror repositories outside of Bitbucket automatically.

What I can think of as a work around is configure a scheduled Pipeline that would do exactly that manual work: fetch from your external repo and then push to the Bitbucket copy. A more sophisticated solution would be to listen to webhooks from the external repository, if they are available, and fetch and push based on that.

Hope this helps. Let me know if you have any questions.

Cheers,
Daniil

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

2,149 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you