[英]Using Gitlab as Proget's feed with a unique place to store packages
Is it possible to use gitlab's package repository to feed our npm packages as well as public packages online.是否可以使用 gitlab 的 package 存储库来提供我们的 npm 包以及在线公共包。 On proget it is possible to register common npm packages and my private npm packages under the same URL using a proxy.在 proget 上,可以使用代理在同一 URL 下注册常见的 npm 包和我的私有 npm 包。 Is it possible to do the same with Gitlab so that pointing to gitlab's repository in the.npmrc would be enough to install all the dependencies?是否可以对 Gitlab 执行相同的操作,以便在 .npmrc 中指向 gitlab 的存储库就足以安装所有依赖项?
Yes, you can have a different registry for your personal packages and eg company packages.是的,您可以为您的个人包裹和公司包裹使用不同的注册表。 You can reference them by @my-gitlab-username/foo-package
or @company/bar-package
.您可以通过@my-gitlab-username/foo-package
或@company/bar-package
引用它们。
NPM packages hosted on npmjs.com which get installed by npm install <package>
will always be resolved if the lookup on your provided Gitlab package registry fails. NPM packages hosted on npmjs.com which get installed by npm install <package>
will always be resolved if the lookup on your provided Gitlab package registry fails. Usually you do not have to provide a separate proxy.通常您不必提供单独的代理。
Multiple private/non-public registries can be targeted by using npm install @company/<package>
.使用npm install @company/<package>
可以定位多个私有/非公共注册表。 So there should be no issue in targeting multiple Proget and/or Gitlab npm registries at the same time.因此,同时针对多个 Proget 和/或 Gitlab npm 注册表应该没有问题。
Authentification is described here: https://stackoverflow.com/a/42648251/4236831此处描述了身份验证: https://stackoverflow.com/a/42648251/4236831
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.