2020-06-08 14:08:27 -04:00
---
type: reference, howto
stage: Manage
group: Import
2020-11-26 01:09:20 -05:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-06-08 14:08:27 -04:00
---
2021-06-01 17:10:06 -04:00
# Import your project from Bitbucket Cloud to GitLab **(FREE)**
2017-08-16 07:05:13 -04:00
2020-12-04 16:09:29 -05:00
NOTE:
2018-08-08 17:59:46 -04:00
The Bitbucket Cloud importer works only with Bitbucket.org, not with Bitbucket
Server (aka Stash). If you are trying to import projects from Bitbucket Server, use
[the Bitbucket Server importer ](bitbucket_server.md ).
2018-06-25 03:56:05 -04:00
2018-08-09 04:57:49 -04:00
Import your projects from Bitbucket Cloud to GitLab with minimal effort.
2021-05-09 20:10:37 -04:00
The Bitbucket importer can import:
2021-09-13 23:11:17 -04:00
- Repository description
- Git repository data
- Issues
- Issue comments
- Pull requests
- Pull request comments
- Milestones
- Wiki
2021-05-09 20:10:37 -04:00
When importing:
2021-09-13 23:11:17 -04:00
- References to pull requests and issues are preserved.
2021-05-09 20:10:37 -04:00
- Repository public access is retained. If a repository is private in Bitbucket, it's created as
private in GitLab as well.
2017-08-16 07:05:13 -04:00
2018-08-09 04:57:49 -04:00
## Requirements
2021-05-09 20:10:37 -04:00
To import your projects from Bitbucket Cloud, the [Bitbucket Cloud integration ](../../../integration/bitbucket.md )
must be enabled. Ask your GitLab administrator to enable this if it isn't already enabled.
2017-08-16 07:05:13 -04:00
## How it works
When issues/pull requests are being imported, the Bitbucket importer tries to find
2020-12-15 19:09:58 -05:00
the Bitbucket author/assignee in the GitLab database using the Bitbucket `nickname` .
2019-08-08 05:26:37 -04:00
For this to work, the Bitbucket author/assignee should have signed in beforehand in GitLab
and **associated their Bitbucket account** . Their `nickname` must also match their Bitbucket
2020-12-15 19:09:58 -05:00
`username.` . If the user is not found in the GitLab database, the project creator
2019-08-08 05:26:37 -04:00
(most of the times the current user that started the import process) is set as the author,
but a reference on the issue about the original Bitbucket author is kept.
2017-08-16 07:05:13 -04:00
The importer will create any new namespaces (groups) if they don't exist or in
the case the namespace is taken, the repository will be imported under the user's
namespace that started the import process.
2020-04-30 14:09:38 -04:00
## Import your Bitbucket repositories
2017-08-16 07:05:13 -04:00
2021-10-26 14:09:19 -04:00
1. Sign in to GitLab.
1. On the top bar, select **New** (**{plus}**).
1. Select **New project/repository** .
1. Select **Import project** .
1. Select **Bitbucket Cloud** .
1. Log in to Bitbucket and grant GitLab access to your Bitbucket account.
2017-08-16 07:05:13 -04:00
2019-08-12 05:54:30 -04:00
![Grant access ](img/bitbucket_import_grant_access.png )
2017-08-16 07:05:13 -04:00
2021-10-26 14:09:19 -04:00
1. Select the projects that you'd like to import or import all projects.
You can filter projects by name and select the namespace
each project will be imported for.
2017-08-16 07:05:13 -04:00
2019-09-26 14:06:29 -04:00
![Import projects ](img/bitbucket_import_select_project_v12_3.png )
2020-04-30 14:09:38 -04:00
## Troubleshooting
If you have more than one Bitbucket account, be sure to sign in to the correct account.
If you've accidentally started the import process with the wrong account, follow these steps:
1. Revoke GitLab access to your Bitbucket account, essentially reversing the process in the following procedure: [Import your Bitbucket repositories ](#import-your-bitbucket-repositories ).
1. Sign out of the Bitbucket account. Follow the procedure linked from the previous step.