Skip to main content
If your organization has changed Git hosting services, and you therefore need to migrate projects from one supported version control repository to another, Anaconda recommends you follow this high-level process:
  1. Perform pre-migration setup.
  2. Run the project migration script.
  3. Perform post migration cleanup.
Prequisites:
  • Update the Anaconda Enterprise config map with the information required to connect to the external version control repository.
  • To run the project migration script, you’ll need Administrator access to a command line tool that can run bash or Python scripts on the master node of the Anaconda Enterprise cluster.
  • You’ll also need the Postgres database password, origin Git host token/password, and destination Git host token/password.

Pre-migration setup

  1. If you haven’t already done so, install the version of conda provided with the Anaconda Enterprise installer on the master node:
  2. After conda is finished installing, login to the terminal again.
  3. Install git, using the command that’s appropriate for your environment: On RHEL/CentOS: yum install git On Ubuntu/Debian: apt install git
  4. Use the following command to create the conda environment:
  5. Use the following command to activate the conda environment:
  6. Temporarily disable reverse proxy authentication by adding the following key-value pair to the git section (outside of the storage section in the config map) of the anaconda-enterprise-anaconda-platform.yml file used to configure the platform to use an external version control repository:
    This should look similar to the following:
  7. Run the following command to restart the associated pod on the master node:
  8. Create a user mappings file that maps Anaconda Enterprise user IDs to Git user IDs. This is a colon-separated text file where the first field is the AE user name, and the second field is the corresponding Git user name. For example:
If you intend on migrating to or from a Bitbucket repository, you must use your Bitbucket account ID instead of your Bitbucket username in the user mappings file.

Using the migration tool

If you’ve migrated to https://github.com, whenever a user is added to a project as a collaborator, they’ll be sent an invitation to collaborate via email. They’ll need to accept this invitation to be able to commit changes to the repository associated with the project. This does not apply to Github Enterprise.
Using the migration tool with https instead of http for the internal storage may result in an SSL error.
The migration tool is a Python script, migrate_projects.py, found in the AE5 installation tarball. It can be used in the following ways:
For example, the tool can be used in the following way:
To ensure tokens are not visible in bash history, they can be omitted and can be entered via stdin when running the script.

Post-migration cleanup

After the script finishes migrating the projects, re-enable reverse proxy authentication by editing the key-value pair you previously added to the git section of the anaconda-enterprise-anaconda-platform.yml file, so it looks like the following:
If you do not re-enable reverse proxy authentication, Anaconda Enterprise will not work.
To verify that the new repository is being used by Anaconda Enterprise, edit an existing project and commit your changes to it.