angular - 在 Azure 中部署私有(private) npm 包

标签 angular git azure npm

我的 Angular 网站集成了 git。我在 Git 中检查代码,代码被部署到 Azure。一切都很好!直到我想 pull 一个私有(private)的 npm 包。最后意识到这可能需要 AzureDevOps,而不是我一直在使用的 VS Code azure 集成。

我更新了 .npmrc 文件,如下

registry=https://pkgs.dev.azure.com/MyCompanyName/_packaging/packageName/npm/registry/
always-auth=true

user .npmrc as follows

//registry.npmjs.org/:username=myname
//registry.npmjs.org/:<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="aecbc3cfc7c293c3d7eec6c1dac3cfc7c280cdc1c3" rel="noreferrer noopener nofollow">[email protected]</a>
//registry.npmjs.org/:always-auth=true
//registry.npmjs.org/:_authToken=6544990b-a2f2-472b-8daa-23f8b0977330

-- 已编辑 -- 转到 Azure Dev ops 路线 Ass upstream 但我没有看到在哪里可以添加私有(private) npm 登录信息。 AzureDevOps 是否支持私有(private) npm 包?我的 npm 登录密码与我的 AzureDevOps userId 不同。

请帮忙。我如何提取我的私有(private) npm 包?

最佳答案

检查 npmrc 的语法。

在所有 examples 中我see就像这个blog post ,那些带有 '//'

的行统计信息
//registry.npmjs.org/:_authToken=...

但是,正如OP注意到的,这需要而不是 VSCode Azure extension ,而是 Azure DevOps services ,扩展名如 VSCode Azure Repos .

Azure Devops 设置使用 upstream source ,这需要上游 view ,如图所示

但是...引用private upstreams was in the work 。是unclear if it is available .

关于angular - 在 Azure 中部署私有(private) npm 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56571798/

相关文章:

angular - 如何防止 Angular 中的内存泄漏

angular - 是否有应用 Angular 顺序/顺序管道?

Angular 9 SSR-在哪里设置全局['window'](使用多米诺骨牌)?

git - 是否可以从父项目修补 Git 中的子模块?

源代码文档中的 git 修订号

azure - Azure Functions 是否适合长时间运行的任务?

typescript - 将TypeScript编译成outDir时外部组件模板或css的路径

Git:git/linux维护者如何维护这么多分支

azure - 如何在 Microsoft Azure AD 中为用户配置电子邮件地址?

c# - Azure存储错误: "An attempt was made to access a socket in a way forbidden by its access permissions."