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

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

I am getting an error when importing an repo from bitbucket server to bitbucket cloud

Edited

Below is the error that I a receiving while migrating the repository from bitbucket server to bitbucket cloud

  1. 13:10:38 git import for: https://xx.xx.xx.xx:7990/scm/uit/gitflowworkflow.git
  2. 13:10:38 Cloning https://xx.xx.xx.xx:7990/scm/uit/gitflowworkflow.git...
  3. 13:10:38 Cloning into bare repository 'pgujja/gitflowworkflow'...
  4. 13:10:44 fatal: unable to access 'https://xx.xx.xx.xx:7990/scm/uit/gitflowworkflow.git/': Received HTTP code 503 from proxy after CONNECT
  5. 13:10:44 Remote Git clone failed: <class 'bitbucket.apps.asyncx.tasks.ImportException'>: Command failed. Return value: 128

Pls help out on this 

1 answer

0 votes

Hi @Praneeth Gujja,

 

Based on the output, it looks that Bitbucket Cloud is not able to reach your Bitbucket Server instance. If you're using a firewall on your server, I would suggest talking with your network administrator and see if it's possible to whitelist the IP addresses for Bitbucket Cloud, to make the connection possible:

 

If this is not possible, e.g. due to a company policy, another thing you can do is:

1. Create an empty repository in Bitbucket Cloud.
In the create repository page, make sure you select No for the options Include a README? and Include .gitignore?, so that the repo is empty.

2. Take a mirror clone of the Bitbucket Server repo, using the --mirror option in the clone command

git clone --mirror <SOURCE-URL>

3. Then, push that mirror clone to the empty Bitbucket Cloud repo

git push --mirror <TARGET-URL>

 

In case your Bitbucket Server repo uses Git LFS, additional steps will be needed. The process for a repo with LFS would be:

1. Create an empty repository in Bitbucket Cloud.
In the create repository page, make sure you select No for the options Include a README? and Include .gitignore?, so that the repo is empty.

2. Take a mirror clone of the Bitbucket Server repo, using the --mirror option in the clone command

git clone --mirror <SOURCE-URL>

3. Fetch all LFS objects in your mirror clone, by executing the following command inside the directory of the mirror clone:

git lfs fetch origin --all

4. Then, push that mirror clone to the empty Bitbucket Cloud repo

git push --mirror <TARGET-URL>
git lfs push --all <TARGET-URL>

Please feel free to let me know if you have any questions.

Kind regards,
Theodora

Suggest an answer

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

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,927 views 10 16
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