Commit cad3627c authored by Daphne Kua's avatar Daphne Kua Committed by Nick Gaskill

Update Bitbucket.org migration docs for user mapped contributions

parent 1862e8f1
...@@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w ...@@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Import your project from Bitbucket Cloud to GitLab **(FREE)** # Import your project from Bitbucket Cloud to GitLab **(FREE)**
NOTE: NOTE:
The Bitbucket Cloud importer works only with Bitbucket.org, not with Bitbucket The Bitbucket Cloud importer works only with [Bitbucket.org](https://bitbucket.org/), not with Bitbucket
Server (aka Stash). If you are trying to import projects from Bitbucket Server, use Server (aka Stash). If you are trying to import projects from Bitbucket Server, use
[the Bitbucket Server importer](bitbucket_server.md). [the Bitbucket Server importer](bitbucket_server.md).
...@@ -31,25 +31,37 @@ When importing: ...@@ -31,25 +31,37 @@ When importing:
- Repository public access is retained. If a repository is private in Bitbucket, it's created as - Repository public access is retained. If a repository is private in Bitbucket, it's created as
private in GitLab as well. private in GitLab as well.
## Requirements ## Prerequisite for GitLab self-managed
To import your projects from Bitbucket Cloud, the [Bitbucket Cloud integration](../../../integration/bitbucket.md) 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. must be enabled. If it isn't enabled, ask your GitLab administrator to enable it. By default it's
enabled on GitLab.com.
## How it works ## How it works
When issues/pull requests are being imported, the Bitbucket importer tries to find When issues/pull requests are being imported, the Bitbucket importer uses the Bitbucket nickname of
the Bitbucket author/assignee in the GitLab database using the Bitbucket `nickname`. the author/assignee and tries to find the same Bitbucket identity in GitLab. If they don't match or
For this to work, the Bitbucket author/assignee should have signed in beforehand in GitLab the user is not found in the GitLab database, the project creator (most of the times the current
and **associated their Bitbucket account**. Their `nickname` must also match their Bitbucket user that started the import process) is set as the author, but a reference on the issue about the
`username`. If the user is not found in the GitLab database, the project creator original Bitbucket author is kept.
(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.
The importer will create any new namespaces (groups) if they don't exist or in 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 the case the namespace is taken, the repository will be imported under the user's
namespace that started the import process. namespace that started the import process.
## Requirements for user-mapped contributions
For user contributions to be mapped, each user must complete the following before the project import:
1. Verify that the username in the [Bitbucket account settings](https://bitbucket.org/account/settings/)
matches the public name in the [Atlassian account settings](https://id.atlassian.com/manage-profile/profile-and-visibility).
If they don't match, modify the public name in the Atlassian account settings to match the
username in the Bitbucket account settings.
1. Connect your Bitbucket account in [GitLab profile social sign-in](https://gitlab.com/-/profile/account).
1. [Set your public email](../../profile/index.md#set-your-public-email).
## Import your Bitbucket repositories ## Import your Bitbucket repositories
1. Sign in to GitLab. 1. Sign in to GitLab.
...@@ -69,9 +81,35 @@ namespace that started the import process. ...@@ -69,9 +81,35 @@ namespace that started the import process.
## Troubleshooting ## Troubleshooting
If you have more than one Bitbucket account, be sure to sign in to the correct account. ### 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: 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. 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. 1. Sign out of the Bitbucket account. Follow the procedure linked from the previous step.
### User mapping fails despite matching names
[For user mapping to work](#requirements-for-user-mapped-contributions),
the username in the Bitbucket account settings must match the public name in the Atlassian account
settings. If these names match but user mapping still fails, the user may have modified their
Bitbucket username after connecting their Bitbucket account in the
[GitLab profile social sign-in](https://gitlab.com/-/profile/account).
To fix this, the user must verify that their Bitbucket external UID in the GitLab database matches their
current Bitbucket public name, and reconnect if there's a mismatch:
1. [Use the API to get the currently authenticated user](../../../api/users.md#list-current-user-for-normal-users).
1. In the API's response, the `identities` attribute contains the Bitbucket account that exists in
the GitLab database. If the `extern_uid` doesn't match the current Bitbucket public name, the
user should reconnect their Bitbucket account in the [GitLab profile social sign-in](https://gitlab.com/-/profile/account).
1. Following reconnection, the user should use the API again to verify that their `extern_uid` in
the GitLab database now matches their current Bitbucket public name.
The importer must then [delete the imported project](../../project/working_with_projects.md#delete-a-project)
and import again.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment