Migrate Azure DevOPs Repository to BitBucket
3 min readFeb 7, 2019
These are steps need to follow if you want the Azure DevOps git to be migrated as is into Bitbucket with history.
Pre-Requisites
- Admin access to Azure DevOps or have permission to generate PAT (Personal Access Token)
- Azure DevOps Username with access to the Git Repo needs to be migrated.
- Bit Bucker Account and Admin Access (Important have admin access at Account level)
Steps
- Login to Azure DevOps
- Goto the right-hand top corner and click to get the sub menu and select security (Image 1) and goto Personal Access Tokens.
3. Create a new token using +New Token button
- Give a name that reflects the correct purpose following the naming conventions
- Select the correct organisation usually only one
- Expiration (UTC): Select minimum no of days
- Scope: Custom define
- Only select Code section read permission
- Once the token get generated to make sure, it is copied and stored securely. The token could not be retrieved again.
4. Goto Bitbucket account and select the “+” Create Repository and select
5. Select Import repository link on the right-hand corner See Image 4
6. You get a new screen with import existing code see Image 5
- Source: Select Git
- URL : Go the Azure DevOps repository and click the clone button and copy the https url and past into Bitbucket URL Input box
- Click required authorization and fill the user name where PAT token was generated.
- The password is the PAT token generated previously in step 3.
- Give a name for the New Repository
- Click Import Repository. This will start the migration process and you will be prompted successful migration message.
7. Once you check the Bitbucket newly imported repository ok, make sure revoke the PAT token created in step 3 for better security.