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

Error import private gitlab repository to bitbucket cloud

Corentin Faivre
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 18, 2024

Hello ! 

I try to import a private gitlab repository self-hosted to a Bitbucket cloud repo. 

I have always the same error : 

15:25:23 git import for: https://git.xxx.xx/repo/ct5.git

15:25:24 Cloning https://git.xxx.xx/repo/ct5.git...

15:25:30 Remote Git clone failed: <class 'bitbucket.apps.asyncx.tasks.RepoImportTask.ImportException'>: Command failed. Return value: 128

I use this documentation and I read a few questions here but no success

I've tried quite a few things : 

  • HTTPS Identification - username (or mail) with password 
  • Personal Acces Tokens 

But I don't know, I have the same error... 

Maybe it comes on a gitlab server?

Thank you for your feedback ! 

1 answer

1 accepted

2 votes
Answer accepted
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 21, 2024

G'day, @Corentin Faivre 

Welcome to the community!

To begin with, I recommend cloning the repository onto your local machine and identifying the type of credentials used for the process. If you need a username and account password, fill out the import forms with those credentials. This is because the import process is essentially the same as when you clone the repository locally.

However, if the import still fails, I suggest following these steps:

  1. Clone the bare repository locally using --mirror options
    git clone --mirror <URL>
  2. Create a repository in Bitbucket cloud
  3. Change the directory into the bare repo cloned locally and update the URL to point them to the newly created repository in Bitbucket
    git remote set-url origin <NEW repo URL>
  4. Check if the URL is updated correctly
    git remote -v
  5. If the URL now points to the repository correctly, use git push to push the repo.

For more information on how to change the remote URL please refer to the following documentation: Change the remote URL to your repository 

Regards,
Syahrul

Corentin Faivre
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 22, 2024

Thank's for your answer ! It's works ! 

Regards, 

Corentin

Like Syahrul likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events