简体   繁体   English

如何在 Nexus 3 中迁移代理 NPM 存储库?

[英]How to migrate a proxy NPM repository in Nexus 3?

I have a Nexus 3 installation with these NPM repos defined:我有一个 Nexus 3 安装,定义了这些 NPM 存储库:

  • npm-all (group) npm-all (群展)
  • npm-internal (hosted) npm-internal(托管)
  • npmjs-org (proxy) npmjs-org(代理)

I would like to be able to populate the npm proxy repository on an Internet connected machine, and then migrate it to a Nexus Server running on a disconnected machine.我希望能够在连接 Internet 的机器上填充 npm 代理存储库,然后将其迁移到在断开连接的机器上运行的 Nexus 服务器。 Nexus 3 has a Task to backup/restore the entire underlying Orient database, but I can't find a way to do it for a specific repository. Nexus 3 有一个备份/恢复整个底层 Orient 数据库的任务,但我找不到针对特定存储库执行此操作的方法。 My goal is to have a npm proxy repo that's populated with NPM packages I need, in an offline environment.我的目标是在离线环境中拥有一个包含我需要的 NPM 包的 npm 代理存储库。

As far as I know there is no way to do this with any built in mechanism.据我所知,任何内置机制都无法做到这一点。 Your best bet is to publish all packages you need to a hosted repository or alternatively just have the proxy repo and server connected to the internet during provisioning but take it offline afterwards.最好的办法是将您需要的所有包发布到托管存储库,或者只是在配置期间将代理存储库和服务器连接到 Internet,但之后将其脱机。

You can use this npm tool.你可以使用这个npm工具。

Using this tool download the artifacts from the repositories and upload them in the offline server使用此工具从存储库下载工件并将它们上传到离线服务器

Disclaimer, I'm the author of this package免责声明,我是这个包的作者

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

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