Migration Tools
About 288 wordsLess than 1 minute
Migration Tools gathers the official tools for moving existing assets to CNB, covering code repositories, artifacts, and project collaboration data.
When to use: when migrating from another platform to CNB — for example bulk-importing GitHub / GitLab / Gitee repositories, keeping code in sync between two platforms, or moving Maven / npm artifacts from another registry. To migrate code only, refer to the manual git push --mirror example at the end.
CNB Code Import
Batch migration of code repositories to CNB, supporting import from GitHub, GitLab, Gitee, and other platforms.
Tool address: https://cnb.cool/cnb/plugins/cnbcool/code-import
Git Sync
Cross-platform Git code sync plugin for syncing code between different Git platforms.
Tool address: https://cnb.cool/cnb/plugins/tencentcom/git-sync
Artifact Migrate
Migrate Maven, npm, Composer, and NuGet artifacts from other registries to CNB.
Tool address: https://cnb.cool/cnb/plugins/cnbcool/artifact-migrate
Collaboration Migrate
Migrate CODING project collaboration data to TAPD or CNB.
Tool address: https://cnb.cool/CODING/tool/migrate-collaboration
Migration Example
The following example fully migrates a public GitHub repository to CNB, preserving all history:
# 1. Clone the bare repository
git clone --bare https://github.com/example/example-repo.git
# 2. Push to CNB (--mirror syncs all branches and tags)
cd example-repo.git
git push --mirror https://cnb.build/my-group/example-repo.git
# 3. Clean up temporary files
cd .. && rm -rf example-repo.gitgit push --mirror pushes all branches and tags of the remote, which is suitable for a full migration. If you only need to migrate specific branches, clone normally and push the desired branches one by one.