简体   繁体   English

Azure devops 无法下载私有 npm 包

[英]Azure devops failing to download private npm packages

I am using Azure DevOps for my node application, but I have private npm packages that fail with a 401 whenever DevOps runs the npm install during the pipeline.我正在为我的节点应用程序使用 Azure DevOps,但我有私有 npm 包,只要 DevOps 在管道期间运行npm install ,这些包就会失败并显示 401。 I have run the additional npm task runner for authenticating where the Registry URL is set to https://npm.pkg.github.com/ along with the Username and Password for the npm account. I have run the additional npm task runner for authenticating where the Registry URL is set to https://npm.pkg.github.com/ along with the Username and Password for the npm account. Finally, I have created a.npmrc file locally within the project that contains @[organisation_name_here]:registry=https://npm.pkg.github.com/ .最后,我在项目中本地创建了一个包含@[organisation_name_here]:registry=https://npm.pkg.github.com/的.npmrc 文件。 However, when I still run the pipeline I still receive the following error:但是,当我仍然运行管道时,我仍然收到以下错误:

npm ERR: 401 Unauthorized. @***/schemas@^1.0.8

I have seen and read about the ability to use Azure Artifacts, however, I would prefer not to avoid using them as I am slowly migrating over to AWS.我已经看到并阅读了有关使用 Azure 工件的能力,但是,我不想避免使用它们,因为我正在慢慢迁移到 AWS。 If Azure Artifacts is the only way, then please help!如果 Azure 神器是唯一的方法,那么请帮助! I'm slowly going insane XD lol我会慢慢发疯的XD哈哈

Thanks:)谢谢:)

If your .npmrc contains Azure Artifacts registries from a different organization or use a third-party authenticated package repository, you'll need to set up npm service connections and specify them in the customEndpoint input.如果您的.npmrc包含来自不同组织的 Azure Artifacts 注册表或使用第三方认证的 package 存储库,您需要设置ZBB30E85411B56DF41296726AB4 服务中的自定义端点连接customEndpoint

registry=https://pkgs.dev.azure.com/{organization}/{project}/_packaging/{feed}/npm/registry/
@{scope}:registry=https://pkgs.dev.azure.com/{otherorganization}/_packaging/{feed}/npm/registry/
@{otherscope}:registry=https://{thirdPartyRepository}/npm/registry/
always-auth=true

Check more details here: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/package/npm-authenticate?view=azure-devops在此处查看更多详细信息: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/package/npm-authenticate?view=azure-devops

暂无
暂无

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

相关问题 VSTS / Azure DevOps在“npm install”上失败 - VSTS/Azure DevOps failing on “npm install” Azure DevOps 发布 NPM 包需要哪些权限 - What permissions are required on Azure DevOps to Publish NPM Packages 在 Azure 中放置私有的“.npmrc”文件后无法安装 npm 包 - Not able to install npm packages after placed the private `.npmrc` file in Azure 私有终结点 Azure DevOps - Private Endpoint Azure DevOps Azure Devops:即使设置了 NPM 身份验证,也无法使用 NPM 私有注册表构建映像 - Azure Devops: Cannot Build an Image using NPM private registry even after setting NPM Authenticate Azure错误还是我错误地使用了github上托管的npm本地软件包和私有软件包? - Azure bugs or am I using npm local packages and private packages hosted on github incorrectly? Azure DevOps - Angular 项目构建失败并出现错误:Npm 失败并返回代码:3 - Azure DevOps - Angular project build failing with error: Npm failed with return code: 3 Azure DevOps Pipeline - React Js 应用程序构建在构建过程中失败(npm run build) - Azure DevOps Pipeline - React Js application build was failing during build (npm run build) NPM 依赖于另一个私有 Bitbucket 存储库 Azure DevOps 管道身份验证失败 - NPM dependencies to another private Bitbucket repo Azure DevOps pipeline authentication fails Azure Static Web 通过 GitHub 部署的应用程序 (.yml) 在私有 npm 包上出现 404 错误 - Azure Static Web App deploying via GitHub Actions (.yml) errors with 404 on private npm packages
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM