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

Praneeth Gujja March 4, 2021

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
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 10, 2021

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
AUG Leaders

Atlassian Community Events