url : https://support.atlassian.com/bitbucket-cloud/docs/import-a-repository/
Select Create > select Repository from the dropdown menu.
Click Import repository from the Create a new repository page.
Select the Source of the code you want to import.
Depending on the Source, the system asks you to provide the following information:
CodePlex: URL, Project name, Repository type
SourceForge: URL, Project name, Repository type
Git: URL, Username/Password combination for private repositories that Require authorization
Note: If your organization has configured a personal access token to retrieve the repository via your Git client or the command line, then you may need to use it in lieu of your username/password within the Bitbucket importer.
Enter a Name for your new repository.
Uncheck This is a private repository if you want the repository to be public.
Select the Repository type.
Expand Advanced settings and fill out the rest of the page if necessary.
Press Import repository.
Does Bitbucket provides java API for creating and importing repository ?
Hi @NITIN ALETY,
Bitbucket Cloud doesn't have an API for importing a repository, but we do have a REST API for creating a repo:
After creating an empty repo, you can take a mirror clone of the repo from the other hosting provider and then push the mirror clone to the newly created Bitbucket repo.
If you want to migrate from Bitbucket Server to Bitbucket Cloud, we have a plugin to migrate repos:
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.