Incorrect configuration found in destination_token
Summary
Unable to push to Gitlab SaaS with token during migration from On-prem to gitlab.com migration.
Steps to Reproduce
- Step 1: Follow instructions to setup running docker container located here. https://gitlab.com/gitlab-org/professional-services-automation/tools/migration/congregate/-/blob/master/docs/full_setup.md (Used centos:lastest image)
- Step 2: Generate Access tokens from both On-prem gitlab, and Gitlab SaaS by going to Users -> Preferences - > Access tokens. Step 2a: Tried with admin users will all scopes added for permissions.
- Step 3: run ./congregate.sh configure (created conf file pasted below with tokens removed)
- Step 4: Start web ui with ./congregate.sh ui &
- Step 5: Navigate to Web UI, stage a single user as a test. Step 5a: Attempted with active user, and inactive user. Same error each time.
- Step 6: Back on the container, verify staged_*.json files contain the correct user.
- Step 7: Run dry run - /congregate.sh migrate --skip-group-export --skip-group-import --skip-project-export --skip-project-import
- Step 8: Be sad because of error message.
Log traces
Conf file generate from congregate configuration questions $ cat data/congregate.conf [DESTINATION] dstn_hostname = https://gitlab.com dstn_access_token = xxxxxxxxxxxxxxxxxxxxxx shared_runners_enabled = True project_suffix = True max_import_retries = 3 username_suffix = uni max_asset_expiration_time = 24
[SOURCE] src_type = GitLab src_hostname = http://gitee.ourcompany.com src_access_token = xxxxxxxxxxxxxxxxxxxxxx src_tier = core export_import_timeout = 3600 ssl_verify = False
[EXPORT] location = filesystem filesystem_path = /Users/tjcb2/congregate
[USER] keep_inactive_users = True reset_pwd = True force_rand_pwd = False
[APP] export_import_status_check_time = 10 wave_spreadsheet_path = /tmp/ mongo_host = localhost mongo_port = 27017 ui_port = 8000 processes = 4
Error message from Dry Run. $ ./congregate.sh migrate --skip-group-export --skip-group-import --skip-project-export --skip-project-import [15 Feb 2022 16:18:29][INFO]|migrate.migrate:111| DRY-RUN: Migrating data from http://gitee.mycompany.com (gitlab) to https://gitlab.com [15 Feb 2022 16:18:29][INFO]|migrate_utils.clean_data:287| Removing /opt/congregate/data/results/dry_run_user_migration.json [15 Feb 2022 16:18:29][INFO]|migrate_utils.clean_data:287| Removing /opt/congregate/data/results/dry_run_group_migration.json [15 Feb 2022 16:18:29][INFO]|migrate_utils.clean_data:287| Removing /opt/congregate/data/results/dry_run_project_migration.json Rotating and emptying: /opt/congregate/data/logs/congregate.log /opt/congregate/data/logs/audit.log [15 Feb 2022 16:18:29][INFO]|migrate.migrate_user_info:656| DRY-RUN: Migrating user info [15 Feb 2022 16:18:29][INFO]|migrate_utils.find_user_by_email_comparison_without_id:186| Searching for user email xxxxx@mycompany.com on https://gitlab.com Traceback (most recent call last): File "congregate/main.py", line 643, in main() File "congregate/main.py", line 365, in main migrate.migrate() File "/opt/congregate/congregate/migration/migrate.py", line 128, in migrate self.migrate_from_gitlab() File "/opt/congregate/congregate/migration/migrate.py", line 154, in migrate_from_gitlab self.migrate_user_info() File "/opt/congregate/congregate/migration/migrate.py", line 660, in migrate_user_info self.users.search_for_staged_users()[0], File "/opt/congregate/congregate/migration/gitlab/users.py", line 368, in search_for_staged_users new_user = find_user_by_email_comparison_without_id(email) File "/opt/congregate/congregate/helpers/migrate_utils.py", line 188, in find_user_by_email_comparison_without_id host, b.config.source_token if src else b.config.destination_token, email) File "/opt/congregate/congregate/helpers/configuration_validator.py", line 66, in destination_token self.dstn_token_validated_in_session = self.validate_dstn_token( File "/opt/congregate/congregate/helpers/configuration_validator.py", line 126, in validate_dstn_token raise ConfigurationException( congregate.helpers.exceptions.ConfigurationException: Incorrect configuration found in destination_token (Response - Invalid user and/or token: { "avatar_url": "https://secure.gravatar.com/avatar/676e76dfa1a504ce96453ca2077b8719?s=80&d=identicon", "bio": "", "bot": true, "can_create_group": true, "can_create_project": true, "color_scheme_id": 1, "commit_email": "group7909867_bot@noreply.gitlab.com", "confirmed_at": "2022-02-15T15:50:43.840Z", "created_at": "2022-02-15T15:50:43.891Z", "current_sign_in_at": null, "email": "group7909867_bot@noreply.gitlab.com", "external": false, "extra_shared_runners_minutes_limit": null, "followers": 0, "following": 0, "id": 10894765, "identities": [], "job_title": "", "last_activity_on": "2022-02-15", "last_sign_in_at": null, "linkedin": "", "local_time": null, "location": null, "name": "****", "organization": null, "private_profile": false, "projects_limit": 100000, "pronouns": null, "public_email": null, "shared_runners_minutes_limit": null, "skype": "", "state": "active", "theme_id": 1, "twitter": "", "two_factor_enabled": false, "username": "group_7909867_bot", "web_url": "https://gitlab.com/group_7909867_bot", "website_url": "", "work_information": null })
Audit log was empty, and congregate log contained same error information as above.