简体   繁体   English

将所有包从私有 npm verdaccio 移动到 AWS CodeArtifact

[英]Move all packages from private npm verdaccio to AWS CodeArtifact

We are using self hosted http://verdaccio.org as a private npm registry.我们使用自托管http://verdaccio.org作为私有 npm 注册表。 Now we decided to move to managed AWS CodeArtifact.现在我们决定转向托管 AWS CodeArtifact。 According to what I understand from documentation, AWS CA can only upstream to a public registry (as npmjs.com).根据我从文档中了解到的,AWS CA 只能上游到公共注册中心(如 npmjs.com)。
My question is how can I migrate all my packages including all it's versions from a private npm to AWS CA?我的问题是如何将我的所有软件包(包括它的所有版本)从私有 npm 迁移到 AWS CA?

Thank you in advance, Oleksii.提前谢谢你,奥列克西。

Any generic migration steps from npm repository A to npm repository B should work when the destination is CodeArtifact.当目标是 CodeArtifact 时,从 npm 存储库 A 到 npm 存储库 B 的任何通用迁移步骤都应该有效。

I had success with a utility called 'pkgmigr8or' 1我成功使用了一个名为“pkgmigr8or”的实用程序1

Steps to migrate 'chalk-pipe' package from 'npmjs' to 'CodeArtifact':将“chalk-pipe”包从“npmjs”迁移到“CodeArtifact”的步骤:

  1. Create a 'packages.txt' file创建一个“packages.txt”文件

     $ cat packages.txt chalk-pipe
  2. Login to CodeArtifact:登录 CodeArtifact:

     $ aws codeartifact login --tool npm --repository npm-store --domain my-domain --domain-owner 123456789012
  3. Make sure you have authentication info for both repository in '~/.npmrc' if the source is also a private repository如果源也是私有存储库,请确保您在“~/.npmrc”中具有两个存储库的身份验证信息

  4. Install pkgmigr8or安装 pkgmigr8or

     # npm install -g pkgmigr8or
  5. Migrate all versions of the package(s):迁移所有版本的包:

     $ pkgmigr8or packages.txt https://my-domain-123456789012.d.codeartifact.us-east-1.amazonaws.com/npm/npm-store/

Other similar projects:其他类似项目:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM